How to add a custom button to the toolbar that calls a JavaScript function?

后端 未结 10 1903
[愿得一人]
[愿得一人] 2020-11-30 17:15

I\'d like to add a button to the toolbar that calls a JavaScript function like Tada()?

Any ideas on how to add this?

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 17:48

    CKEditor 4

    There are handy tutorials in the official CKEditor 4 documentation, that cover writing a plugin that inserts content into the editor, registers a button and shows a dialog window:

    • Creating a CKEditor 4 Plugin in 20 Lines of Code
    • Creating a Simple CKEditor Plugin

    If you read these two, move on to Integrating Plugins with Advanced Content Filter.

    CKEditor 5

    So far there is one introduction article available:

    CKEditor 5 Framework: Quick Start - Creating a simple plugin

提交回复
热议问题