JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.3
[ckeditor.git] / _source / plugins / specialchar / dialogs / specialchar.js
index 01b0f86..6cc0845 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -25,7 +25,10 @@ CKEDITOR.dialog.add( 'specialchar', function( editor )
                        target.removeClass( "cke_light_background" );\r
                        dialog.hide();\r
 \r
-                       editor.insertHtml( value );\r
+                       // We must use "insertText" here to keep text styled.\r
+                       var span = editor.document.createElement( 'span' );\r
+                       span.setHtml( value );\r
+                       editor.insertText( span.getText() );\r
                }\r
        };\r
 \r