Opened 10 years ago

Last modified 10 years ago

#6350 closed Bug

button functionality not working — at Initial Version

Reported by: Ashis Owned by:
Priority: Normal Milestone:
Component: UI : Toolbar Version:
Keywords: Cc:

Description

Hello Everyone,

I added a new button into the ckeditor. when I click this button the selected text into the ckeditor will be bold and add a new tag (<storng><ticker>ABC</ticker></strong>), but it is not working in Mozzila - 3.5.13 and IE - 6.0. Bellow is the code details:

var editor = CKEDITOR.replace( 'editor_kama', { editor.on( 'pluginsLoaded', function( ev ) {

editor.addCommand( 'TickerCmd', {

exec : function( editor )

{

var editor_data = CKEDITOR.instances.editor_kama.getData();

var mySelection = editor.getSelection();

if (CKEDITOR.env.ie) {

mySelection.unlock(true); selectedText = mySelection.getNative().createRange().text;

} else {

selectedText = mySelection.getNative();

} selectedConText = '<strong><ticker>'+selectedText+'</ticker></strong>';

editor.insertHtml(selectedConText.toUpperCase());

}

});

editor.ui.addButton( 'Ticker', {

label : editor.lang.common.Ticker, command : 'TickerCmd', icon : this.path + '/js/ckeditor/tool.png'

} );

});

CKEDITOR.addStylesSet( 'my_styles', [ { name : 'newParagraph', element : 'p', styles : { 'margin-top' : '5px' } }

]);

Please help..

Thanks Ashis

Change History (0)

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy