Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(