The Rich Text control of a xpage is derived from CKEditor from lotus 8.5.2, however in previous versions it was a Dojo rich text editor.
A CKEditor control just created in a xpage doesn’t have Dojo attribute explicitly defined as shown in the figure below:
The toolbarType attribute is implicitly set to “Medium”, its default value, and defines a particular toolbar.
Setting toolbarType you choose the functionality of the toolbar at the top of the rich text and it can take 3 values which correspond to three different toolbars:
var customToolbar="[['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']]"; return customToolbar;
If you want a full toolbar the value of “toolbar” is:
var customToolbar="[['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']," +"['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']," +"['Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt']," +"['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField']," +"'/'," +"['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']," +"['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']," +"['Link','Unlink','Anchor']," +"['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']," +"'/'," +"['Styles','Format','Font','FontSize']," +"['TextColor','BGColor']," +"['Maximize', 'ShowBlocks','-','About']]"; return customToolbar;
To obtain an empty toolbar, set “toolbar” to:
var customToolbar=""; return customToolbar;
CKEditor 3.x Developer’s Guide
2 replies on “The Dojo attributes toolbarType and toolbar of a Rich Rext control in the XPages”
I just created myself a custom toolbar and noticed that the Cut and Copy are greyed out and not clickable for me also. This is regardless of where I am in the CKEditor control. I even typed in new text to see if I could highlight and copy without luck. I also tried to use the ‘Full’ toolbarType and used Simple Binding rather than a scoped variable with same result. Will continue to investigate and post reply if I find something.
If I add the ‘Cut’,’Copy’,’Paste’ icons, they appear in the toolbar but Cut and Copy are greyed out and not clickable. I am able to use keyboard shortcuts ctrl-c and ctrl-v, but they work correctly with or without the icons. How do I enable the icons so they function properly?