Issac Song
Issac Song

Reputation: 81

With tinyMCE how to make a rich-text editor coexist with another textarea?

After reading a few examples of tinyMCE, the project is like changing every available textarea into a rich-text editor. I never find it init with an element id or selector by any kind. So can I make an ordinary textarea co-exist with a tinyMCE rich-text editor?

<html>
<head>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
        theme : "advanced",
        mode : "textareas"
});
</script>
</head>

Upvotes: 1

Views: 491

Answers (1)

Brett Henderson
Brett Henderson

Reputation: 1684

There are two ways you can do this.

You can either set the mode to "exact" and specify the ID's of the textarea(s) you want converted to TinyMCE instances using the elements config item.

Alternatively you can set the mode to "specific_textareas" and specify the CSS class you want to assign to the appropriate textareas that are to be converted to TinyMCE instances using the editor_selector config item.

Upvotes: 3

Related Questions