3
votes

I am using TinyMCE editor for my application.

I want to have my body and the presentation toolbar on screen with "readonly".

readonly:true 

makes the presentation bar disable which is not acceptable by client (needs both content area and toolbar).

I successully made the:

body.contentEditable = false;

which works good but when i click any of the presentation icon or button it gives the effect like when i click bold it makes the document text bold which should not.

1
can you show it in fiddle - yb007
please try to add bullets and some alignment, as my requirement it should not take effect even after clicking on it. Thanks... - Nimmi
so, what you want is to have a visible toolbar, which is not functional? - Thariama
i have added a demo in the answer below.... check out if it meets your requirement - yb007

1 Answers

2
votes

You may add the following to undo the changes in the editor and execute it onchange_callback.

//undo all the changes in the editor    
tinyMCE.activeEditor.undoManager.undo();

//remove all undo levels so there will no possibility of redoing last action
tinyMCE.activeEditor.undoManager.clear();

Here is a DEMO

Hope it helps!!