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' )"

Possible replacement: "else if ( tagName == 'pre'
tagName == 'textarea' )"

-Line 332: Original: "if ( currentNode.name == 'pre' )"

Possible replacement: "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)

fragment_new.js (13.8 KB) - added by QQQ 15 years ago.
my applied changes

Download all attachments as: .zip

Change History (8)

Changed 15 years ago by QQQ

Attachment: fragment_new.js added

my applied changes

comment:1 Changed 15 years ago by QQQ

is anyone going to be doing anything about this?

comment:2 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: HasPatch added; textarea spacing br pre removed

comment:3 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:4 Changed 14 years ago by Wiktor Walc

Version: SVN (CKEditor) - OLD3.0

comment:5 Changed 12 years ago by Jakub Ś

Keywords: HasPatch removed
Status: newconfirmed

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 Jakub Ś

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.

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:7 Changed 12 years ago by Piotrek Koszuliński

I reopened #9995 because that was a separate issue related to processing, not parsing.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy