#3487: getText() not always returns string
-------------------------------+--------------------------------------------
 Reporter:  tobiasz.cudnik     |       Owner:  tobiasz.cudnik
     Type:  Bug                |      Status:  new           
 Priority:  Low                |   Milestone:  CKEditor 3.0  
Component:  General            |     Version:  SVN (CKEditor)
 Keywords:  Confirmed Review?  |  
-------------------------------+--------------------------------------------
 For empty nodes, getText() will return undefined instead of empty string.
 According to jsdoc, this method returns string.

 === Sample testcase ===
  1. Using "Replace Textarea by code" example, fill editor with content:
 {{{
 <h1></h1>
 }}}
  2. Evaluate this code:
 {{{
 var e = CKEDITOR.instances.editor1;
 var text = e.document.getBody().getChild( 0 ).getText();
 console.log(typeof text);
 CKEDITOR.tools.trim(text);
 }}}
  3. Results in "TypeError: str is undefined" from CKEDITOR.tools.trim

 Please correct me if my point of view is incorrect.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/3487>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to