Opened 11 years ago

Closed 8 years ago

#898 closed defect (inactive)

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 (7)

comment:1 Changed 11 years ago by guest

  • Component changed from Documentation to Xinha Core
  • Owner changed from akaEdge to gogo

comment:2 Changed 11 years ago by ray

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

comment:3 Changed 11 years ago by mharrisonline

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

comment:4 Changed 11 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

comment:5 Changed 11 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 --> ');
  }
  );

comment:6 Changed 11 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-;'

comment:7 Changed 8 years ago by gogo

  • Resolution set to inactive
  • Status changed from new to closed

Inactive. Maybe 8 works.

Note: See TracTickets for help on using tickets.