Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

CKEditor : Add additional Toobar options


Hi keenthemes,

I choose classic editor : <a>https://preview.keenthemes.com/metronic8/demo1/documentation/editors/ckeditor/classic.html</a>

and now I wanted to add additional toolbar button to the CKEditor.

I did this as seen :

var KTFormsCKEditorClassic={
init:function(){
ClassicEditor
.create( document.querySelector( '.kt_ckeditor_document' ),

{
toolbar: [
"alignment", "heading","|","bold","italic","link","bulletedList","numberedList","|","outdent","indent","|","uploadImage","blockQuote","insertTable","mediaEmbed","undo","redo"
]
}
)
.then((o=>{console.log(o)}))
.catch((o=>{console.error(o)}))
}
};

KTUtil.onDOMContentLoaded((
function(){
KTFormsCKEditorClassic.init()
})
);


But the toolbar stays the same as the default, any idea how we can achieve that, like you did in CKEditor Document edition in documentation ?
like here :
<a>https://preview.keenthemes.com/metronic8/demo1/documentation/editors/ckeditor/document.html</a>

thank you


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Hi,

Sorry for the late reply. I hope you figured it out already happy
Anyways if you need to use other features of CKeditor you will need to include them in the gulp config/webback config and compile it to make it available globally.



Regards.



I'm interested about "allignement" and "font size".

I did add "allignement" avonve but doesn't work.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(