Exception message in .appendTo() always shows null
If the CKEDITOR.appendTo() method is called with an invalid id the exception generated will always show "[CKEDITOR.editor.appendTo] The element with id "null" was not found" instead of the proper id.
This code fixes it (still searching for proper SVN cliente for Mac):
CKEDITOR.editor.appendTo = function( elementOrId, config )
{
var element = elementOrId;
if ( typeof element != 'object' )
{
element = document.getElementById( elementOrId );
if ( !element )
throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.';
}
// Create the editor instance.
return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO );
};
Change History (5)
Keywords: |
Review? added; HasPatch removed
|
Milestone: |
→ CKEditor 3.1
|
Owner: |
set to Garry Yao
|
Status: |
new →
assigned
|
Keywords: |
Review+ added; Review? removed
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
Targeting it to 3.1 since it's an frequent exception facing developers.