Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyMCE popups break globally on 3.1.8 #13

Open
Tangdongle opened this issue Nov 25, 2014 · 4 comments
Open

TinyMCE popups break globally on 3.1.8 #13

Tangdongle opened this issue Nov 25, 2014 · 4 comments

Comments

@Tangdongle
Copy link

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.

@nathancox
Copy link
Owner

So far I can't seem to reproduce this. Can you give me some example code that's not working for you?

@stevie-mayhew
Copy link

@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?

@Tangdongle
Copy link
Author

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.

@nathancox
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants