481 Posts in 150 Topics by 238 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1355 Views |
-
Removing TinyMCE

28 August 2010 at 9:25am
Hello, guys.
I replaced TinyMCE with other content editor, but i don't want to change core files, i wrote:
Requirements::block('sapphire/thirdparty/tinymce/tiny_mce_src.js');
Requirements::block('sapphire/javascript/tiny_mce_improvements.js');and
$fields->removeFieldFromTab('Root.Content.Main', 'Content');
$fields->addFieldToTab('Root.Content.Main', new HTEditField('Content'));
in Page.php,everything works fine, but anyway I have tinymce lines in source code:
<script type="text/javascript">//<![CDATA[
if((typeof tinyMCE != 'undefined')) {
....
//]]></script>How can i remove them or totally replace HtmlEditorField class w/o changing core files?
-
Re: Removing TinyMCE

13 September 2010 at 2:11am
you can't.
The reason is that, i consider /cms/javascript/LeftAndMain.js as being a core file, and in that file there's some references to tinymce!
have a look at the end of the js file, you'll find some behaviour created to instantiate tinymce...So to completely remove the code you're talking about you got to edit the core files...
-
Re: Removing TinyMCE

13 September 2010 at 2:13am
by the way which is the other editor you use, i'll also remove tinymce, as the HtmlEditorField is buggy for me, i'll create my own.
i need to have multiple html editor in the same page, and it sucks with htmleditorfield when i do that. -
Re: Removing TinyMCE

20 September 2010 at 1:13am Last edited: 20 September 2010 4:55am
I blocked LeftAndMain.js too and created my own as long as tiny_mce_improvements.js and SS plugins for CKEditor
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeFieldFromTab('Root.Content.Main', 'Content');
$fields->addFieldToTab('Root.Content.Main', new CkEditField('Content'));
}CkEditField extended from HtmlEditorField
But .. i commented out custom script requirement in HtmlEditorFieldConfig so i didn't change core files besides that one class, so I just asking about can I block custom script inclusion?
| 1355 Views | ||
|
Page:
1
|
Go to Top |


