Non-editable custom object

  •  11-05-2004, 3:13 PM

    Non-editable custom object

    I'm looking for some help in making objects within the editor non-editable. 
    I've got a custom button on the toolbar that inserts a DIV object into the editor text.  This DIV is merely a placeholder within the editor and will be the target of later processing (outside of the editor).  I'd like to allow sizing of this DIV, but not editing. 
     
    I've had partial success by using ContentEditable attribute.  By setting this attribute false, it prevents editing within the DIV, but it still shows the text-entry border (thick hatched border) clicked while active.  Worse, if I include any container tags within the DIV, any click will show the text-entry border.  When this border is displayed, any insert from the toolbar goes into my placeholder object rather than on the page.
     
    Do you know of any way I can prevent ALL editing of a single object within the editor?
     
    To reproduce the behavior, paste the following as HTML into the editor then see what happens when you click twice on the object.
        <DIV contentEditable=false>Placeholder Object</DIV>
     
    Alternatively, paste this snippet into the editor as HTML and click (just once) on the words:
        <DIV contentEditable=false><b>Placeholder Object</b></DIV>
     
View Complete Thread