Ticket #898 (closed defect: inactive)

Opened 6 years ago

Last modified 4 years ago

Inserting HTML comment in IE 7 doesn't work.

Reported by: guest Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords:
Cc:

Description

IE 7 seems to break the inserting of comments.

I've used a custom button to create a page break comment:

config.registerButton("pagebreak", "Insert Page Break", "/htmlarea/images/ed_hr.gif", false,
  function(editor, id) { editor.insertHTML('<!-- PAGE BREAK -->');
  }
  );

It work in FF, but not in IE 7. It works if I change the HTML to something else.

Change History

Changed 6 years ago by guest

  • owner changed from akaEdge to gogo
  • component changed from Documentation to Xinha Core

Changed 6 years ago by ray

This is is a malfunction in IE, I don't think there's much we can do about this :(

Changed 6 years ago by mharrisonline

Are you using the GetHtml plugin? THis is exactly the kind of thing it takes care of, IE bugs.

Changed 6 years ago by ray

The comment fails to be inserted in the DOM, although MSDN says range.pasteHTML () may insert any HTML elements including comments, so that would be a bug.

There's no way for GetHtml to get this if never is there

Changed 6 years ago by mharrisonline

I am using IE7. If I select some text, click on the EditTag plugin's button, paste in <!-- PAGE BREAK --> where I want it to be and click OKAY, then view source, the comment is where I put it.

If I view source and paste <!-- PAGE BREAK --> into the HTML, go to WYSIWYG mode, then return to HTML view, my code is still there.

If I use the edit tag plugin and do not first select any text, then paste in <!-- PAGE BREAK --> and click OKAY, the comment is not there when I look at the source.

If I put a space before and after the comment it also does not work. If I paste in  <!-- PAGE BREAK -->  it works.

Maybe this could be a workaround for you until someone figures out how to fix this new IE bug:

config.registerButton("pagebreak", "Insert Page Break", "/htmlarea/images/ed_hr.gif", false,
  function(editor, id) { editor.insertHTML(' <!-- PAGE BREAK --> ');
  }
  );

Changed 6 years ago by mharrisonline

Whoops, of course you can't see what I typed.

Insert this HTML, without the - characters

'&-n-b-s-p-;<!-- PAGE BREAK -->&-n-b-s-p-;'

Changed 4 years ago by gogo

  • status changed from new to closed
  • resolution set to inactive

Inactive. Maybe 8 works.

Note: See TracTickets for help on using tickets.