Is it possible to add a class to an image? Or a span? I don't see an option for it in the editor.
Extensions -> MicroTiny -> Settings -> Admin Editors -> Stylesheet for editor is set to a test sheet with a few sample classes in it. I want to be able to apply one of these classes to images added in the editor. This used to be possible with the only TinyMCE, is it still?
Adding a class to an image in MicroTiny and CMSMS 2.1.1
Re: Adding a class to an image in MicroTiny and CMSMS 2.1.1
Do you have the classes set up as img.class {some styles} or just .class {somestyles}..?
You may be able to add the class when adding the image there may be a tab for advanced functions in the image picker where you browse for images to insert...
You may be able to add the class when adding the image there may be a tab for advanced functions in the image picker where you browse for images to insert...
Re: Adding a class to an image in MicroTiny and CMSMS 2.1.1
Sadly there is no option to add a class, either img.class or .class, to an image using the default MicroTiny setup.
However I've since found that TinyMCE is still maintained and provides this functionality (along with much more) right out of the box, with a very similar interface. It's also has a lot more config options, so I'll stick with that for future projects.
Thanks for your help!
(Also, I *have* wondered what happened to the Album module as per your sig, but your website appears to be down currently)
However I've since found that TinyMCE is still maintained and provides this functionality (along with much more) right out of the box, with a very similar interface. It's also has a lot more config options, so I'll stick with that for future projects.
Thanks for your help!
(Also, I *have* wondered what happened to the Album module as per your sig, but your website appears to be down currently)
Re: Adding a class to an image in MicroTiny and CMSMS 2.1.1
The Album site is still working for me...
Re: Adding a class to an image in MicroTiny and CMSMS 2.1.1
I found a solution to this issue using JavaScript. Here it is in case a help...
ECB add a checkbox to the template like this sorta thing:
2. Add something like this to the parent div of where you want image (or any specific element to get a class) (see the if statement in the bit below
3. add this into your javascript:
if it gets checked, any image within that div gets the class added. This of course assumes JavaScript is allowed by the user, It's a bit of a workaround, but it's done the thing I need.
ECB add a checkbox to the template like this sorta thing:
Code: Select all
{content_module module=ECB2 field=checkbox block=floatimagesright label='Float an image in the main text to the right and wrap text around it?' default=1 assign='floatimagesright'}
Code: Select all
<div id="inner_main_content" class="inner {if $floatimagesright==true} floatimagesright{/if}">
Code: Select all
$('.floatimagesright img').addClass('right_wrapper');