Opened 10 years ago

Closed 9 years ago

#4243 closed Bug (worksforme)

Protected tag not rendered right with insertElement

Reported by: Stefan Owned by:
Priority: Normal Milestone: CKEditor 3.1
Component: General Version: 3.0 RC
Keywords: Confirmed WorksForMe Cc:

Description

I configured a tag for protection:

Excerpt from config.js

CKEDITOR.editorConfig = function( config )
{
  config.protectedSource.push(/<protected>.*?<\/protected>/g);
  // ...
};

The following

editor.insertHtml('<mct>some text <protected>foobar</protected></mct>');

produces 'some text' in editor.

The following code produces some missbehaviour:

var mct = CKEDITOR.dom.element('mct', editor.document);
mct.setHtml('some text <protected>foobar</protected>');
editor.insertElement(mct);

I see 'some text foobar'.
Switch on source view.
Switch off source view.
I see 'some text'.

Change History (5)

comment:1 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added
Milestone: CKEditor 3.xCKEditor 3.1

The element::setHtml behavior cannot be controlled by us, but the insertHtml function should definitely handle this situation properly.

comment:2 Changed 9 years ago by Garry Yao

Owner: set to Garry Yao
Status: newassigned

comment:3 Changed 9 years ago by Garry Yao

Keywords: WorksForMe added

The 'insertHtml' function works correctly for me in this sense, Fred could you confirm it again?
Ticket Test added at : http://ckeditor.t/tt/4243/1.html.

comment:4 Changed 9 years ago by Garry Yao

Owner: Garry Yao deleted
Status: assignednew

comment:5 Changed 9 years ago by Frederico Caldeira Knabben

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy