I added ckeditor using this syntax <script src="https://nightly.ckeditor.com/full/ckeditor.js"></script>. My ckeditor editor toolbar looks like below.
ckeditor
<script src="https://nightly.ckeditor.com/full/ckeditor.js"></script>
I would like to add new functionalities to an existing icon.
How can I do that ?
2
Use this CKEditor version CDN
<script src="https://cdn.ckeditor.com/ckeditor5/35.3.2/super-build/ckeditor.js"></script>
for reference :- https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/quick-start.html#using-the-ckeditor-5-superbuild
Try to add as a plugin like this,
CKEDITOR.plugins.add("timestamp", { init: function (editor) { editor.addCommand("insertTimestamp", { exec: function (editor) { var now = new Date(); editor.insertHtml(now.toString()); }, }); editor.ui.addButton("Timestamp", { label: "Insert Timestamp", command: "insertTimestamp", toolbar: "insert", icon: "https://cdn4.iconfinder.com/data/icons/24x24-free-pixel-icons/24/Clock.png", }); }, });
Check the clock icon in the toolbar option besides smiley icon. You can add the functionality to be performed in the exec function
clock icon
smiley icon
exec
Hope this helps
Click here to cancel reply.
2
Answers
Use this CKEditor version CDN
for reference :- https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/quick-start.html#using-the-ckeditor-5-superbuild
Try to add as a plugin like this,
Check the
clock icon
in the toolbar option besidessmiley icon
.You can add the functionality to be performed in the
exec
functionHope this helps