Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Content Editor Discussions /

Forum for content editors and CMS users.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

tiny mce image edit problem


Go to End


10 Posts   6728 Views

Avatar
mattman

Community Member, 18 Posts

9 February 2010 at 9:25pm

Hi

I am trying to replace the code:

img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|name]

with

img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style]

hoping to get the image positioning to work for my client - and cannot find out where to do this as there is no tinymce config file to edit??

IMAGE EDITING IS CURRENTLY COMPLETELY DISFUNCTIONAL which is a major PROBLEM - it does not remember / publish horizontal, vertical space and border when right click edited and the alignment options do not match the insert options which I can edit through the typography.css, which means I have to delete the picture and reinsert. My clients cannot edit the site easily which is a major concern!!!

I have searched for hours and cannot find a solution. PLLLLLLLLLLLLLLS HEEEEEEEEEEEEEELP this is urgent.

MANY THANKS!!!

Avatar
Willr

Forum Moderator, 5523 Posts

10 February 2010 at 11:19am

Its defined in the cms/_config.php file under the 'extended_valid_elements' option in HtmlEditorConfig settings. If you want to customize the valid elements you'll probably want to do so from your own code rather than editing core http://doc.silverstripe.org/doku.php?id=htmleditorconfig

Avatar
mattman

Community Member, 18 Posts

10 February 2010 at 11:53am

Hi Willr

Thanks so much for responding - I had a look at this and cannot figure out how the required code fits into the setOption(’optionname’, ‘value’) ? - I am very new to Silverstripe.

Any assistance would be greatly appreciated as the deadline is tomorrow!

Many thanks again

Avatar
Willr

Forum Moderator, 5523 Posts

10 February 2010 at 12:13pm

In your mysite/_config file add

HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap|style],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]");

Avatar
mattman

Community Member, 18 Posts

10 February 2010 at 12:42pm

Thanks a MILLION Willr - unfortunately the end of your code got cut off - can you please resend??

Avatar
mattman

Community Member, 18 Posts

10 February 2010 at 12:57pm

Please dont waste your time I figured it out - THANKS AGAIN!

HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap|style],iframe[src|n");

Avatar
mattman

Community Member, 18 Posts

10 February 2010 at 1:01pm

HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|
usemap|style],iframe[src|n");

Avatar
Tomae

Community Member, 14 Posts

15 June 2010 at 10:42pm

Hi all... I want to have "onmouseover" & "onmouseout" functionality for "<a>" tags .... I tried this way

HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "a[id|class|style|href|onmouseout|onmouseover],script[type|src],img[id|class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]");

but again tinyMCE strips out my code.....

Pls help me to figure out the problem.....

Thanks

Go to Top