views:

489

answers:

1

Hi,

I am using tinymce editor to give good look of textarea where user write some comments.I want to give him two options one is plain text and the other is rich text editor option.When user click on plain text option all rich text option removed and when user click on rich text it will get all options of formatting text. I want to do this in TinyMce Editor.

Is there anyone know how to implement it?i am searching from last 6 days how to implement this but i am failed to get any solution.If someone got any solution tellme.i am in very need of that solution.

+1  A: 

Well, you can take a look here:

Toggle editor with JavaScript

The code used is:

toggleEditor('content')

If you want the editor mode to be toggled based on the option chose by the user from another page, you can execute (or not to) the above function on page load.

There are links to other examples on that page which you might find useful too.

Update:

Upon reading the question a second time, you are asking for a plain-text/html and not a html-source/wysiwyg model. My suggestion above isn't the exact solution but it is still workable if the mode switching in the plain-text mode is hidden and locked.

o.k.w
i am working on that task about 5 months ago.but i found that solution which you have given.thanx o.k.w.
Emaad Ali