Hello,
I would like to use the editor as a readonly viewer for a text file. I use the insertText to initialize the editor, but I haven't found how to hide all the toolbar buttons with the exception of the print button.
I tried using the the initalization seuquence below, but nothing showed up in the editor. Does anyone know how to go about this ?
var editor = CKEDITOR.replace( 'textFileViewer', {
removePlugins "dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,clipboard," +
"button,panelbutton,panel,floatpanel,colorbutton,colordialog,menu," +
"contextmenu,dialogadvtab,div,elementspath,enterkey,entities,popup," +
"filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo," +
"font,format,forms,horizontalrule,htmlwriter,iframe,image,indent," +
"indentblock,indentlist,justify,link,list,liststyle,magicline," +
"maximize,newpage,pagebreak,pastefromword,pastetext,preview," +
"removeformat,resize,save,menubutton,scayt,selectall,showblocks," +
"showborders,smiley,sourcearea,specialchar,stylescombo,tab,table," +
"tabletools,templates,toolbar,undo,wsc,wysiwygarea"
});
editor.on('instanceReady', function() {
editor.insertText(textData);
});
Ok, managed to figure it out,
Ok, managed to figure it out, omitting the toolbar plugin from the exlclusion list along with the plugins that it depends on did the trick
Now I am struggeling with setting the focus on the edior and moving the cart to the top of the edior (fthe edior shows the end of the content after text was inserted)
Tried various solutions out there such as this one:
http://ckeditor.com/forums/CKEditor-3.x/SOLVED-How-set-cursor-position-CKEditor
but nothing has worked for me so far.