javascript - Get UI button clicked on CK Editor toolbar -


i have built simple plugin ck editor (because apparently that's way add custom button toolbar?)

i'd know how can dom id of custom button when clicked (or object representative of button allow me create jquery object)

(function () {     ckeditor.plugins.add('myplugin', {         icons: 'myicon',         hidpi: true,         init: function (editor) {              editor.addcommand('mycommand', {                 exec : function(editor) {                     // button information                 }             });              editor.ui.addbutton && editor.ui.addbutton('mycommand', {                 label: 'custom action',                 command: 'mycommand',                 toolbar: 'insert,5',                 icon: 'myicon'             });          }      }); })(); 

i'd attach own custom ui element toolbar when button clicked , need relative anchor point in order display in correct position on screen.

i'm using ck editor 4.2

in case, can access button following code (using jquery):

$(document).on('click', '.cke_button__mycommand', function(){     // stuff }); 

you can inspect toolbar browser more information.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -