With FireFox is default. But when i use IE, it process wrong. It insert "templateName" at where curson point.
I want insert "templateName" at fckeditor not anywhere.
How focus editor area?
var oDropList = new Object();
oDropList.Name = 'SelectTemplate';
oDropList.Execute = function(templateName)
{
var oValue;
if(FCK.EditorDocument.selection.createRange())
{
FCK.EditorDocument.selection.createRange().text = templateName;
}
else if(FCK.EditorWindow.getSelection())
{
oValue = FCK.EditorWindow.getSelection();
.......
}
}
I want insert "templateName" at fckeditor not anywhere.
How focus editor area?
var oDropList = new Object();
oDropList.Name = 'SelectTemplate';
oDropList.Execute = function(templateName)
{
var oValue;
if(FCK.EditorDocument.selection.createRange())
{
FCK.EditorDocument.selection.createRange().text = templateName;
}
else if(FCK.EditorWindow.getSelection())
{
oValue = FCK.EditorWindow.getSelection();
.......
}
}
Re: How focus editor area?
Re: How focus editor area?