We just need the possibility to set caption as standard, in some kind.
Say a class to like .no-caption to set it offf when stadard is yes e.g. for a content type. And the .caption class to set it on when standard is off.

Comments

davidwhthomas’s picture

To re-phrase, you mean new default config settings

1. caption all images or
2. caption only images with the "caption" class ?

Option 1 would probably need to be restricted to the main content area or could interfere with the theme.

I could see it becoming problematic to mark images not to caption.

Interesting though.

reinis.berzins’s picture

This solution works well for TinyMCE editor. Open the following file: 0:/public_html/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js and add a single line to it (around line No.180):

insertAndClose : function() {
...
		tinyMCE.activeEditor.dom.setAttrib(tinyMCE.activeEditor.dom.select('img'), 'class', 'caption'); // Add this line No.180
		tinyMCEPopup.close();
	},

Although the selected class="caption" doesn't appear as selected on the insert/edit image dialogue, still every image inserted into textarea via tinyMCE editor gets automatic class="caption".

rooby’s picture

Title: Caption as standard » Caption all images with a title attribute

I agree, I would like an option to 'caption all images' and then use whether or not the image has a title attribute as whether or not it has a caption.

Having to add classes is clunkly and unnecessary.

rooby’s picture

Also, in terms of marking images as no-caption, that is unnecessary too, just leave the title attribute empty and the image will be skipped over when captioning.