Skip to content Skip to sidebar Skip to footer

How Do I Make Textarea A TinyMCE In Joomla?

I have a component and I want to make a textarea on the admin backend interface use the TinyMCE editor: How do I reference the TinyMCE that is being used by other components (inst

Solution 1:

Looks like all I had to do was get an instance of JEditor and use this to render my textarea:

<?php echo $this->editor->display('name_of_your_field', 'predefined value', '100%', '400', '80', '15');?>

Solution 2:

<script type="text/javascript">
tinyMCE.init({
        mode : "textareas",
        theme : "simple",
        editor_selector : "mceSimple"
});

tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        editor_selector : "mceAdvanced"
});
</script>


<textarea name="product_section_table[]" class="mceAdvanced" style="width:95%">
</textarea>

If you need an advanced editor set class=mceAdvanced. If you want a simple editor then set class=mceSimple.


Post a Comment for "How Do I Make Textarea A TinyMCE In Joomla?"