Using TinyMCE / Toolbar in a single page in Dashboard
Permalink
I would like to use TinyMCE with the C5 Toolbar in a single_page in the dashboard. I know how to call it generically, but I don't know how to call it in my own page so that it ties into Concrete5's version of TinyMCE that also gives me direct access to files / images etc that have been uploaded in the Concrete5 dashboard.
Are there any examples of this? I am writing a block that displays press releases, and then a single_page in the dashboard for admin of the press releases. I would like to use the full C5 tinymce with the ability to add images etc that I've uploaded thru the dashboard.
Thanks alot, C5 geeks!
joe
Are there any examples of this? I am writing a block that displays press releases, and then a single_page in the dashboard for admin of the press releases. I would like to use the full C5 tinymce with the ability to add images etc that I've uploaded thru the dashboard.
Thanks alot, C5 geeks!
joe
I placed the following in the construct function of the single page controller:
$this->addHeaderItem($html->javascript('tiny_mce/tiny_mce.js'));
Inside the single page I just created some textareas with class="advancedEditor ccm-advanced-editor"
For the toolbar I used:
Loader::element('editor_controls', array('mode'=>'full'));
Hope this helps.
$this->addHeaderItem($html->javascript('tiny_mce/tiny_mce.js'));
Inside the single page I just created some textareas with class="advancedEditor ccm-advanced-editor"
For the toolbar I used:
Loader::element('editor_controls', array('mode'=>'full'));
Hope this helps.
if you look at the content block, thats basically how it works, for a singlepage i havn't loaded the concrete5 toolbar just the basic editor with a few buttons
I don't know off the top of my head how to do this, but if you look at how the built-in "content" block does it, perhaps you can figure out how to make it work for your single page as well. Just go into the /concrete/blocks/content directory and check out the "editor_init.php" and "editor_config.php" files. Definitely would need a bit of rejiggering to make it work in a single page, but hopefully it gives you the general idea.
Good luck!
-Jordan