Opened 16 years ago
Closed 16 years ago
#3487 closed Bug (fixed)
getText() not always returns string — at Version 2
Reported by: | Tobiasz Cudnik | Owned by: | Tobiasz Cudnik |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | SVN (CKEditor) - OLD |
Keywords: | Confirmed Review+ | Cc: |
Description (last modified by )
For empty nodes, getText() will return undefined instead of empty string. According to jsdoc, this method returns string.
Sample testcase
- Using "Replace Textarea by code" example, fill editor with content:
<h1></h1>
- Evaluate this code:
var e = CKEDITOR.instances.editor1; var text = e.document.getBody().getChild( 0 ).getText(); console.log(typeof text); CKEDITOR.tools.trim(text);
- Results in "TypeError: str is undefined" from CKEDITOR.tools.trim
Please correct me if my point of view is incorrect.
Change History (3)
Changed 16 years ago by
Attachment: | 3487.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|---|
Priority: | Low → Normal |
comment:2 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed with [3469].