Page 1 of 1

TinyMCE from frontend?

Posted: Fri May 29, 2009 6:31 am
by sletts02
I'm trying to call TinyMCE from the front end. I have searched the forums but the posts returned didn't help/had no context.

Code: Select all

$this->smarty->assign('content', $this->CreateTextArea(true, $id, $content, 'textbox', '', 'textbox'));
^Above code i'm trying to edit.

Re: TinyMCE from frontend?

Posted: Fri May 29, 2009 7:58 am
by Jeff
Give us more details. Where are you trying to use that and what problems are you having?

Re: TinyMCE from frontend?

Posted: Fri May 29, 2009 3:20 pm
by Peciura
To use TinyMCE 2.5.0beta3 i created UDT "FEU_TinyMCE" and i include it to every form template. To adjust TinyMCE to "frontend user needs" refer to  http://wiki.moxiecode.com/index.php/TinyMCE:Configuration.

Code: Select all

echo '
<__script__ type="text/javascript" src="modules/TinyMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></__script>
<__script__ type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas",
language : "en",
entity_encoding : "raw",
entities : " ",
apply_source_formatting : "true",
remove_trailing_nbsp : "true",
apply_source_formatting : "true",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left", 
theme_advanced_path_location : "bottom",
content_css : "example_advanced.css", 
extended_valid_elements : "a[href|target|name]",
plugins : "table, paste,fullscreen",
theme_advanced_buttons1 : "cut,pastetext,pasteword,copy,|,removeformat,|,justifyleft,justifycenter,justifyright,justifyfull,|,sub,sup,|,charmap,|,code",
theme_advanced_buttons2 : "bold,italic,underline,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,charmap,|,fullscreen,visualaid",
theme_advanced_buttons3 : "tablecontrols",
width:"400px",
height:"300px"
});
</__script>';
/*,|,formatselect,fontsizeselect,|,code*/
/*|,forecolor,backcolor,*/
/*
apply_source_formatting : "true",*/

Re: TinyMCE from frontend?

Posted: Fri May 29, 2009 11:44 pm
by sletts02
thank you :) Works great!

Re: TinyMCE from frontend?

Posted: Fri Jan 06, 2012 3:27 pm
by mr.bacan
Tried Peciura's solution on version 1.10.2 and works great.
Thanks.