Hi,
I'm trying to create a plugin which allows the user to insert a custom object, the custom object being, in this case, a <div> containing an image and some other stuff. The div object is initially created via a plugin and its dialog - this much I have working.
I want the <div> object to be treated atomically in the editor, that is, I only want the user to be able to edit it's properties via a dialog and to be able to delete the entire thing. I'm not sure how to go about implementing this step. It seems one approach would be intercept events on the object, for instance a mousedown event should cause the entire object to be selected. A contextual menu could then be used to display the object's properties dialog or the delete key could be pressed to delete the object. Does this seem like a reasonable approach? I've spent a number of hours looking at fckeditor code, forums, and googling but I'm a bit stumped as how to proceed. Suggestions appreciated.
Thanks,
t.
I'm trying to create a plugin which allows the user to insert a custom object, the custom object being, in this case, a <div> containing an image and some other stuff. The div object is initially created via a plugin and its dialog - this much I have working.
I want the <div> object to be treated atomically in the editor, that is, I only want the user to be able to edit it's properties via a dialog and to be able to delete the entire thing. I'm not sure how to go about implementing this step. It seems one approach would be intercept events on the object, for instance a mousedown event should cause the entire object to be selected. A contextual menu could then be used to display the object's properties dialog or the delete key could be pressed to delete the object. Does this seem like a reasonable approach? I've spent a number of hours looking at fckeditor code, forums, and googling but I'm a bit stumped as how to proceed. Suggestions appreciated.
Thanks,
t.