Hi,
I am new to CKEditor. I am calling a java script method ('changeToolBar()') during the instanceReady of my CKEditor. In the changeToolBar() method, I am trying to change the toolbar but the toolbar is not getting changed. Any help is appreciated.
Here is my code:
I am new to CKEditor. I am calling a java script method ('changeToolBar()') during the instanceReady of my CKEditor. In the changeToolBar() method, I am trying to change the toolbar but the toolbar is not getting changed. Any help is appreciated.
Here is my code:
<script type=\"text/javascript\">
var oEditor = CKEDITOR.replace( ' sRTFName ',
{
on :
{
instanceReady : function( ev )
{
changeToolBar(ev);
}
}
});
function changeToolBar( editorInstance )
{
if(mode == 2) // if mode is 2 then it is view only
{
editorInstance.editor.config.toolbar = 'TAReadOnly';
//toolbar TAReadOnly enables only maximize button
}
else{
// code for edit mode.
}
}
</script>