Opened 15 years ago
Closed 15 years ago
#6350 closed Bug (fixed)
button functionality not working
| Reported by: | Ashis | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | UI : Toolbar | Version: | |
| Keywords: | Cc: |
Description (last modified by )
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 (2)
comment:1 Changed 15 years ago by
| Description: | modified (diff) |
|---|
comment:2 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

Please use our forums for discussions and community support.