17487 Posts in 4473 Topics by 1978 members
|Go to End|
22 May 2008 at 8:43am
Can anybody help me? I'm trying to get a textarea with tinyMCE in the security tab. To do this i've made a adjustment in the SecurityAdmin class. I've added a HtmlEditorField to the fieldset in the getEditForm function. The textarea is visible and the content is saved to the database, but there's no tinyMCE visible. Has anybody done this before? Is there a tutorial for this?
Thanks in advance!
Grayzag (aka ajshort)
27 May 2008 at 9:13pm Last edited: 27 May 2008 9:14pm
As the security area is not designed to use TinyMCE, you'll need to hack some of this files in the cms/ directory to achieve this. If you examine cms/templates/Includes/, SecurityAdmin_right.ss and CMSMain_right.ss, youll notice the tag
<% include Editor_toolbar %>
28 May 2008 at 5:26am
Thanks for the help. Once I added the editor toolbar in the template, tinymce was visible , but it still didn't work. Then I also copied the following code from the init of CMSMain.php to the in it of SecurityAdmin.php and everything works fine.
// We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
"ContentCSS" => (SSViewer::current_theme() ? "themes/" . SSViewer::current_theme() : project()) . "/css/editor.css",
"BaseURL" => Director::absoluteBaseURL(),
"Lang" => i18n::get_tinymce_lang()
|Go to Top|