how to validate and prevent publish in netlify-cms with gatsby? - netlify-cms

I'm trying to add some validation in the netlify cms on the uploaded images, I want to check the extension of images to be one of ['png', 'jpg', 'jpag'], otherwise, I want to disable the publish button or showing any error message; I'm struggling with their docs and I can't find anything about validation except for strings types, any help would be appreciated

Related

Strapi CKEditor shows MediaLib image for richtext field

Using the CKEditor with strapi to allow rich-text fields, some work great while others are rendering as MediaLib uploads only.
Here's the content type in Strapi:
And here's how it renders:
I add them the same way as any text field:
My versions are:
"#ckeditor/ckeditor5-build-classic": "^27.0.0",
"#ckeditor/ckeditor5-react": "^3.0.2",
The only way to get the full ckeditor field to show back up was a complete rebuild of the code from the source. There wasn't anything missing or changed from this, so I'm not sure if this is cache related or not but this is worrisome if it can reappear.

upload of image with CKEditor plus KCFinder resulting in page not found

I've just learned about the existence of such plug-in. I'm trying to implement an image upload feature using KCFinder. I've also used the standard version of CKEditor, that contains a button for image uploading, without a "Upload" tab.
Instructions tell me to add some lines in CKEditor's config.js, indicating the KCFinder's browser and upload scripts, as follows:
config.filebrowserImageBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=images';
config.filebrowserImageUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=images';
I've tried many different ways to specify the location of these scripts, but no matter what I do, when attempting to upload the image to the server, an error message will show up:
Sorry, the page you are looking for could not be found.
Tons of tutorials, but none help me.
<script>CKEDITOR.replace('body', {
filebrowserUploadUrl: '/admin/upload/content',
filebrowserImageUploadUrl: '/admin/upload/content',
})</script>
replace selector textarea

Laravel form placeholder not display correctly

I'm new with laravel and I do not know what's wrong with my forms. All placeholders display special non-translated HTML characters on my application online. But locally they are displayed very well. I checked and added this but nothing changes. Someone can help me please

URL to edit image with media uploader thickbox

I'm using WordPress 3.5 and trying to figure out how can I edit an image by clicking on it to get to the media uploader thickbox.
What I found out so far
The URL below work fine but I need to EDIT a special image, not add one. I have an attachment ID.
/wp-admin/media-upload.php?post_id=1&type=image&TB_iframe=1&width=640&height=553
To make the thickbox work I need to add the classes info thickbox.
Question
I found many articles on how to upload images but not how to edit them. Maybe I can just add some get variale to get it to work?

Image Hosting Website Script Deactivates FancyBox Capability

I'm running a Vanilla Forum with a FileUpload plugin, allowing users to upload images and insert the corresponding code directly into the body of their post. These images work with FancyBox when clicked, linking together nicely within the page. However, should a user use a third-party image hosting site (i.e. Imagevenue, Imageshack, Postimage.org) and copy and paste the resulting image code, it deactivates the FancyBox feature associated with all images previously on the page, so when you click on an image uploaded via FileUpload it opens in a new window now instead of in a FancyBox.
My question is one of two things:
a) Is it possible to fix this formatting issue so that if a user does choose to use a third-party image hosting service then it will not affect the fancybox of my previous images.
or
b) Is it possible to block this type of image code from being inputted in the body of a post to prevent this from ever happening.
Thank you and please reply if you would like more information!
Most likely the generated code from those third-party hosting sites has not an image extension (JPG, PNG, GIF) so fancybox doesn't know what type of content needs to handle.
If you are binding fancybox like
$(".fancybox").fancybox();
... you could force the type of content to image like
$(".fancybox").fancybox({
type : "image"
});
I don't really see how pasting the code of a new image will disable the code for existing ones if you want to elaborate.

Resources