Opened 15 years ago
Last modified 12 years ago
#5294 confirmed New Feature
Handling textareas within CKeditor
Reported by: | QQQ | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | 3.0 |
Keywords: | Cc: |
Description
<textareas> are being handled like normal HTML tags, when they should be getting the same treatment as <pre> tags.
I've done a quick look and from what I see, the offending file would be fragment.js: -Line 152: Original: "&& element.name != 'pre'" Possible replacement: " && element.name != 'pre' && element.name != 'textarea'"
-Line 191: Original: "else if ( tagName == 'pre' )"
tagName == 'textarea' )" |
-Line 332: Original: "if ( currentNode.name == 'pre' )"
currentNode.name == 'textarea' )" |
That should theoretically fix it. I haven't worked much with it, so this is all untested, but it'd be nice if someone who has more of an idea how to work this could make a proper patch.
Attachments (1)
Change History (8)
Changed 15 years ago by
Attachment: | fragment_new.js added |
---|
comment:2 Changed 15 years ago by
Keywords: | HasPatch added; textarea spacing br pre removed |
---|
comment:4 Changed 14 years ago by
Version: | SVN (CKEditor) - OLD → 3.0 |
---|
comment:5 Changed 12 years ago by
Keywords: | HasPatch removed |
---|---|
Status: | new → confirmed |
User means that contents of textarea element should not be changed by the editor, just like a <pre>
tag.
NOTE: I don't think that patch is valid.
comment:6 Changed 12 years ago by
Problem can be still reproduced in CKEditor 4.x (v4).
#9995 was marked as duplicate.
Here is pull request from #9995:
https://github.com/ckeditor/ckeditor-dev/pull/25
Taking however this ticket report into account, I'm not sure if approach is valid.
comment:7 Changed 12 years ago by
I reopened #9995 because that was a separate issue related to processing, not parsing.
my applied changes