Opened 8 years ago

Closed 8 years ago

#13635 closed Bug (invalid)

editor.getSelectedHtml( ) returns unclosed br with data-cke-eol attribute

Reported by: DHess Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


Steps to reproduce

  1. User selects paragraph in editor
  2. In code, call var str = editor.getSelectedHtml(true)

Expected result

Expect any br element to take form <br/> and do not expect any data-cke-* attributes

Actual result

other content <br data-cke-eol="1">

Other details (browser, OS, CKEditor version, installed plugins)

cke 4.5.1 Chrome Version 44.0.2403.130 (64-bit) OS X (v 10.9.4)

Change History (1)

comment:1 Changed 8 years ago by Piotrek Koszuliński

Keywords: getSelectedHtml data-cke-eol removed
Resolution: invalid
Status: newclosed
Version: 4.5.1

<br> (without /) is a proper HTML tag. And the attribute is important to mark that this <br> means that an end of line was selected.

Just in case it isn't clear - please do not confuse editor.getData() (so "the data") with methods like editor.getSelectedHtml() (so "the inner HTML"). They are not the same thing.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy