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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Content Editor Discussions /

Forum for content editors and CMS users.

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

Removing TinyMCE


Go to End


6 Posts   4935 Views

Avatar
Tonyair

Community Member, 81 Posts

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?

Avatar
otiteca

Community Member, 5 Posts

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...

Avatar
otiteca

Community Member, 5 Posts

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.

Avatar
Tonyair

Community Member, 81 Posts

20 September 2010 at 1:13am

Edited: 20/09/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?

Avatar
ud2013

Community Member, 6 Posts

1 June 2013 at 1:54am

Sorry, I know this post is old, but I use ss3 and wish to use ckeditor instead of the tiny_mce editor. I have looked on google, but haven't found a good instruction on how to replace tiny_mce with ckeditor.

Any help would be great.

Thanks

Avatar
forumq42

Community Member, 18 Posts

20 September 2013 at 1:17pm

I also would be quite interested to know (along with several others):

- which SilverStripe version this works with (currently we run instances of 2.4.x until a 3.x migration plan is mapped out)

- which editor you replaced TinyMCE with

- detailed instructions

It would be quite nice to try CKEditor as an alternative to TinyMCE and/or how to at least add an alternate HTML editor instead of TinyMCE's default HTML editor.