Opened 8 years ago

Closed 8 years ago

#14577 closed Task (invalid)

Adding New Item using editor.AddmenuItem

Reported by: eteamin Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


I am using this code to create instance of CKEDITOR and add a new item using editor addmenuitem: <script src="${tg.url('/lib/ckeditor/ckeditor.js')}"></script> <div class="row">

<div class="col-xs-12">

<textarea id="editorlocal">





<script type="text/javascript">

CKEDITOR.replace('editorlocal', {

scayt_serviceProtocol: 'http',

scayt_serviceHost: '${server_host}', scayt_servicePort: '${server_port}', scayt_servicePath: 'scayt/ssrv.json', scayt_customerId: ,

scayt_srcUrl: '/lib/ckscayt/ckscayt.js', scayt_autoStartup: true

}); CKEDITOR.config.scayt_sLang= 'fa_IR';

var editor = CKEDITOR.instances.editorlocal; var addtodb = 'addtodb'; editor.addCommand(addtodb, { exec: function () {} }); editor.addMenuItem({

label : 'ADD', command : addtodb


alert('shit'); editor.contextMenu.addListener( function( element ) {

return {




</script> but in the console it says addMenuItem is not a function. I want to know where exactly does this function is ready to be used so i can create the menu item after that point. thank you

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.5.9 (GitHub - master)

Please ask your questions on Stack Overflow. This is a place for reproting CKEditor bugs.

Second - just please have a look at the code in order to find our how and where to use this method:

However in most cases this method is used:

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy