id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 12214,Issues with upcasting codesnippet using editor#insertElement,Marek Lewandowski,,"Generally widgets seems not to have issues with upcasting items inserted by editor#insertElement(). I've tested it at our [http://ckeditor.com/demo#widgets demo] with **SimpleBox** and **Image2**. As a sample I will include steps to include valid widget to **image2** and **codesnippet** (which does not work). == Image2 == Execute following code in JavaScript console: {{{ var el = new CKEDITOR.dom.element( 'figure' ); el.setHtml( '
foobar
' ); // This will insert image into editor below the ""Enhanced Image"" headline. CKEDITOR.instances.editor3.insertElement( el ); }}} Image widget is created. == Code Snippet == Execute following code in JavaScript console: {{{ var el = new CKEDITOR.dom.element( 'pre' ); el.setHtml( 'var x = 1;' ); // This will insert image into editor below the ""Enhanced Image"" headline. CKEDITOR.instances.editor2.insertElement( el ); // Even calling this manually doesn't work: // CKEDITOR.instances.editor2.widgets.initOnAll(); }}} Code snippet is not upcasted (but it will be after toggling source/wysiwyg mode it will be created as expected). Code seems to be ok, pretty much the same for both cases.",Bug,closed,Normal,,General,,invalid,,