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.

Content Editor Discussions /

Forum for content editors and CMS users.

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

TinyMCE HTML Editor Auto-balancing Tag Nesting


Reply


5 Posts   1418 Views

Avatar
Jun-jun

Community Member, 4 Posts

10 November 2010 at 10:27pm

If you put - <span><span></span><span></span></span>

It will sa save as - <span><span><span></span></span></span>

My init configuration in mysite/_config --

HtmlEditorConfig::get('cms')->setOptions(array(
'forced_root_block' => ""
));

Avatar
lerni

Community Member, 80 Posts

11 November 2010 at 1:22am

hi

you post brings me the spam sketk into mind (anyway this gaves spam the name)
http://www.youtube.com/watch?v=ODshB09FQ8w

this probable was not very helpfull but what is the real-live usecase for that anyway?

this probable more helpfull:
HtmlEditorConfig::get('cms')->setOption('verify_html', false);

see here:
http://doc.silverstripe.org/htmleditorconfig?s[]=htmleditorconfig

luk

Avatar
Jun-jun

Community Member, 4 Posts

11 November 2010 at 2:22am

I still have the problem.

HtmlEditorConfig::get('cms')->setOption('verify_html', false); --- it did'nt work.

i also tried 'cleanup' => false and still have the problem.

Any ideas how to totally disable the automatic cleanning function after saving the content?

Avatar
lerni

Community Member, 80 Posts

11 November 2010 at 2:32am

uhm.. did you put it in _config.php or function getCMSFields? here it works on 2.4.2 if it's in _config.php

Avatar
Jun-jun

Community Member, 4 Posts

11 November 2010 at 3:55am

Edited: 11/11/2010 4:28am

Yes, I put it inside mysite/_config.php

I also tried it to a fresh install silverstripe in my localhost and stil have the problem.

Please try to insert <span><span></span><span></span></span> in the HTML Source Editor then save it.

It will save as <span><span><span></span></span></span>.

I think the silverstripe is causing the cleaning because I can replicate the problem in my standalone TinyMCE that I downloaded.

http://tinymce.moxiecode.com/download.php