21277 Posts in 5728 Topics by 2599 members
General Questions
SilverStripe Forums » General Questions » TinyMCE and Template plugin : themes/myTheme/css/editor.css isn't load !
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1025 Views |
-
TinyMCE and Template plugin : themes/myTheme/css/editor.css isn't load !

7 May 2011 at 2:45am
Hello,
I use Silverstripe 2.3.7 (i know : i will upgrade
) but i think this problem is in the last release too.
I use TinyMCE Template plugin but when i select a template, his preview isn't good : my editor.css isn't load. In firebug, i can see this error :
http://www.domain.tld/%20themes/myTheme/css/editor.css 404 Not Found
I think it's because a space (%20) is added !
I solved my problem by modifying the file jsparty/tiny_mce2/plugins/template/js/template.js, in "loadCSSFiles" function, line 49. I remove spaces before and after the string.
Before :
loadCSSFiles : function(d) {
var ed = tinyMCEPopup.editor;tinymce.each(ed.getParam("content_css", '').split(','), function(u) {
d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');
});
},After :
loadCSSFiles : function(d) {
var ed = tinyMCEPopup.editor;tinymce.each(ed.getParam("content_css", '').split(','), function(u) {
u = u.replace(/^\s+/g,'').replace(/\s+$/g,'');
d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');
});
},Hope this help somebody
-
Re: TinyMCE and Template plugin : themes/myTheme/css/editor.css isn't load !

7 May 2011 at 7:07pm
Did you try to remove the spaces around the +´s?
Before:
d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');After:
d.write('<link href="'+ed.documentBaseURI.toAbsolute(u)+'" rel="stylesheet" type="text/css" />');I think this is the place where the spaces are embed.
| 1025 Views | ||
|
Page:
1
|
Go to Top |


