﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12861	Using simple inserHtml in a text transform plugin causing errors in editor	Jason Pickard		"Ok so I have started out with the text transform plugin located here: http://ckeditor.com/addon/texttransform

That plugin really does not work well with CKEDITOR 4.4.6.  So for functions that transforms text to upper case, I have changed the code in plugin.js to this:

            editor.addCommand('transformTextToUppercase',
                {
                    exec : function( editor )
                    {
                        var selection = editor.getSelection();

                        var selected_text = selection.getSelectedText();

                        if (selected_text.length > 0)
                        {
                            editor.insertHtml(selected_text.toUpperCase());
                        }
                    }
                });


Where this basically works, I get a index size error when insertHtml is called.  The traceback is below:

Uncaught IndexSizeError: Failed to execute 'setEnd' on 'Range': The offset 69 is larger than or equal to the node's length (63).
	ckeditor.js:410 CKEDITOR.dom.selection.selectRanges
	ckeditor.js:403 CKEDITOR.dom.selection.unlockplugin.js?t=EAPE:36 
	editor.addCommand.execckeditor.js:177 
	execckeditor.js:244 
	CKEDITOR.tools.extend.execCommandckeditor.js:620 
	CKEDITOR.tools.extend.clickckeditor.js:621 
	d.executeckeditor.js:621 
	(anonymous function)ckeditor.js:27 
	(anonymous function)ckeditor.js:27 
	CKEDITOR.tools.callFunctionckeditor.php:1 onclick

Please advise"	Bug	closed	Normal		Core : Editable		invalid		
