Open Tangdongle opened 9 years ago
So far I can't seem to reproduce this. Can you give me some example code that's not working for you?
@Tangdongle - it might be because the code I provided you with changes the body class of the editor, perhaps try removing the line $footerField->setBodyClass('banner-content');
from the configuration and see if that works?
Using this config: $simpleConfig = HTMLEditorConfig::get('simple'); $simpleConfig->setButtonsForLine(1, array( 'bold', 'underline', 'link', 'unlink', )); $simpleConfig->setButtonsForLine(2, array());
And with this set on the editor: $simpleHTMLEditor = new HTMLEditorField('c1', ''); $simpleHTMLEditor->setEditorConfig('simple');
And with a 'simple' HTMLEditorField and SS' default Content HTMLEditorField on the same tab. Edit: It seems it only occurs when you refresh the CMS, yet functions fine when you move between pages.
A bit of experimenting tells me the problem seems to be HTMLEditorConfig::get('simple');
. Just having that in there causes error even if there's no associated field.
I'll look into it further but as a quick fix this seems to work:
$simpleConfig = CustomHtmlEditorConfig::copy('simple', 'cms');
I suspect the problem is that initialising a blank config (even with CustomHtmlEditorConfig::copy('simple', 'simple');
makes it miss some required setting that's in the cms
config.
When adding a new config and setting on an HTMLEditorField, popups cease to function on the default HTMLEditorField. This includes, Link, HTML Editor, Special Character Editor and the Table button.