Hi everyone,
I wrote a plugin to input tex tags to the editor area, it looks as follows:
the problem is as usual with IE, I get en error:
in directory - fckeditor/editor/js/fckeditorcode_ie.js in line 89
does anyone know the solution or what can cause the problem?
I wrote a plugin to input tex tags to the editor area, it looks as follows:
var TexTags_command = function() {
}
TexTags_command.prototype.Execute = function() {
var selection = FCK.EditorDocument.getSelection();
if(selection.length > 0) {
FCK.InsertHtml('[tex]' + selection + '[/tex]');
} else {
FCK.InsertHtml('[tex][/tex]');
}
}
// register the command
FCKCommands.RegisterCommand( 'Tex_command' , new TexTags_command() ) ;
// Create button.
var oTexItem = new FCKToolbarButton( 'Tex_command' , FCKLang.TexTitle ) ;
oTexItem.IconPath = FCKPlugins.Items['Tex'].Path + 'tex.gif' ;
FCKToolbarItems.RegisterItem( 'Tex', oTexItem ) ;
the problem is as usual with IE, I get en error:
Object doesn't support this property or method
in directory - fckeditor/editor/js/fckeditorcode_ie.js in line 89
does anyone know the solution or what can cause the problem?

Re: plugin problem
Re: plugin problem
TexTags_command.prototype.Execute = function() { var selection; if (FCKBrowserInfo.isGecko) { selection = FCK.EditorWindow.getSelection(); } else { selection = FCK.EditorDocument.selection.createRange().text; } FCK.InsertHtml('[tex]' + selection + '[/tex]'); }Re: plugin problem
FCK.InsertHtml('hello');the error is still the same..this is my first try with FCK plug ins, so maybe I am wrong when writing whole thing? is my code actually right?
Re: plugin problem
the code looks now as follows:
var TexTags_command = function() { } TexTags_command.prototype.Execute = function() { var selection; if (FCKBrowserInfo.IsGecko) { selection = FCK.EditorWindow.getSelection(); } else { selection = FCK.EditorDocument.selection.createRange().text; } FCK.InsertHtml('[tex]' + selection + '[/tex]'); } FCKCommands.RegisterCommand( 'Tex_command' , new TexTags_command() ) ; var oTexItem = new FCKToolbarButton( 'Tex_command' , FCKLang.TexTitle ) ; oTexItem.IconPath = FCKPlugins.Items['Tex'].Path + 'tex.gif' ; FCKToolbarItems.RegisterItem( 'Tex', oTexItem ) ;I think it should work, but maybe there is sth wrong with it when it comes to IE parsing?