I have a simple plugin that inserts a placeholder at the current cursor position for subsequent dynamic loading of an ASP.NET user control. The placeholder is in fact an OBJECT tag. The placeholder gets inserted by the following function in fckplugin.js:
FCKEmbedControl.Add = function(controlname) {
FCK.InsertHtml("<object classid='xxx." + controlname + "' />");
}
The insertion works, but the OBJECT tag gets wrapped in a P tag, which I do not want. I have tried various ways to remove the current node/element when the plugin is initialised, such as:
var oEditor = window.parent.InnerDialogLoaded();
var FCK = oEditor.FCK;
var eSelected = FCK.Selection.GetParentElement();
var tools = oEditor.FCKDomTools;
tools.RemoveNode(eSelected);
but nothing seems to work and frankly I don't really know what I am doing!
Any advice would be gratefully received.
Jon
FCKEmbedControl.Add = function(controlname) {
FCK.InsertHtml("<object classid='xxx." + controlname + "' />");
}
The insertion works, but the OBJECT tag gets wrapped in a P tag, which I do not want. I have tried various ways to remove the current node/element when the plugin is initialised, such as:
var oEditor = window.parent.InnerDialogLoaded();
var FCK = oEditor.FCK;
var eSelected = FCK.Selection.GetParentElement();
var tools = oEditor.FCKDomTools;
tools.RemoveNode(eSelected);
but nothing seems to work and frankly I don't really know what I am doing!
Any advice would be gratefully received.
Jon