Re: Custom Begin Tag Removed using PasteHTML

  •  08-10-2006, 3:39 PM

    Re: Custom Begin Tag Removed using PasteHTML

    One more issue about custom tags. I think this one must be related to those bugs listed above.

    Basically, my company want to use custom tags (something like <placeholder> or <customtag>) to do dynamic content merge. We need to create a custom dialog to add/edit the custom tags. To edit an existing custom tag, we expect to use javascript to get the html code of the custom tag, so we can edit it in our custom dialog then use PasteHTML() to update it in the editor.
     
    Following are the steps to replicate the issue:
    1. type in the html code in HTML view: <placeholder attribute="default name">[[First Name]]</placeholder>
    2. switch back to Normal view then highlight the tag.
    3. execute the following javascript code to see what html code we can get:
      editor1 = document.getElementById('<%=Editor1.ClientID%>');
      alert(editor1.GetSelection().createRange().htmlText);
    We expect to get the whole custom tag returned, so we can change the attribute value. But it only returns the text [[First Name]]. After executing the PasteHTML("<placeholder attribute="John">[[First Name]]</placeholder>") on the highlighted area, the html code in editor will change to (in real testing, the bugs listed above will cause the begin tags being removed):

    <placeholder attribute="default name"><placeholder attribute="John">[[First Name]]</placeholder></placeholder>

    We expect to replace the whole tag, but it seems only to replace the text [[First Name]] and cause nested custom tags. Maybe it is because Cute Editor doesn't support custom tags? Will this issue be resolved in September?
     
     
View Complete Thread