Closed augustoppimenta closed 2 years ago
The difference between "Basic", "Standard" and "Full" version of CKEditor is only the config setting.
This is an example config written by coffee
CKEDITOR.editorConfig = (config) ->
config.toolbar_Full = [
{ name: 'document', items: [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items: [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items: [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks','-','About' ] },
'/',
{ name: 'basicstyles', items: [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items: [ 'Link','Unlink','Anchor' ] },
'/',
{ name: 'styles', items: [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items: [ 'TextColor','BGColor' ] },
{ name: 'insert', items: [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
]
config.toolbar = 'Full'
You just need to reduce what you don't want or set several toolbar for use. More info on CKEditor docs
Hello tsechingho,
Many thanks for the help, and to install the gem has not been generated to make me any my settings file.
Could you help me?
Project repository: https://github.com/augustoppimenta/editor
PS.' I'm starting with Ruby and RoR.
Thank you
Hello,
Managed to set up this gem:
Step 1) Create a directory in / assets / javascripts
/ckeditor
Step 2) Create a file:
config.js.coffee
Step 3) Add the code below:
CKEDITOR.editorConfig = (config) ->
config.toolbar_Full = [
{ name: 'document', items: [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items: [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items: [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks','-','About' ] },
'/',
{ name: 'basicstyles', items: [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items: [ 'Link','Unlink','Anchor' ] },
'/',
{ name: 'styles', items: [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items: [ 'TextColor','BGColor' ] },
{ name: 'insert', items: [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
]
config.toolbar = 'Full'
Hello,
This gem is set to Full version of CKEditor. How do I use the "Standard" version as well as the "Basic" version.