Opened 12 years ago

Closed 10 years ago

#3457 closed New Feature (fixed)

There is no way to add textarea content

Reported by: Artur Formella Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone: CKEditor 3.6.2
Component: UI : Dialogs Version:
Keywords: Cc: Sa'ar Zac Elias, Garry Yao, damn man

Description

There is no way to change the textarea content in WYSIWYG mode (actually in FF, IE and Opera. In Webkit is buggy).

It should be possible in textarea dialog.

Attachments (5)

3457.patch (3.3 KB) - added by Alfonso Martínez de Lizarrondo 10 years ago.
Proposed patch
3457_patch_-_FF4_Screenshot.png (10.6 KB) - added by Frederico Caldeira Knabben 10 years ago.
3457_2.patch (3.5 KB) - added by Alfonso Martínez de Lizarrondo 10 years ago.
Increase dialog height
testWhitespaceTextarea.html (1.5 KB) - added by Alfonso Martínez de Lizarrondo 10 years ago.
testcase
3457_3.patch (1.9 KB) - added by Alfonso Martínez de Lizarrondo 10 years ago.
patch for fragment.js

Download all attachments as: .zip

Change History (19)

comment:1 Changed 12 years ago by Artur Formella

Keywords: Confirmed added
Milestone: CKEditor 3.xCKEditor 3.1

comment:2 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.1CKEditor 3.x

comment:3 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Cc: Sa'ar Zac Elias Garry Yao added

#5748 and #5295 have been marked as dups

comment:4 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:5 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Cc: damn man added

#6113 has been marked as dup

Changed 10 years ago by Alfonso Martínez de Lizarrondo

Attachment: 3457.patch added

Proposed patch

comment:6 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Owner: set to Alfonso Martínez de Lizarrondo
Status: confirmedreview

The patch rearranges the cols & rows field to use just one row in the dialog and adds a textarea below to set the value.

Changed 10 years ago by Frederico Caldeira Knabben

comment:7 Changed 10 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

The dialog is prety much broken for me, after patch.

Changed 10 years ago by Alfonso Martínez de Lizarrondo

Attachment: 3457_2.patch added

Increase dialog height

comment:8 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Status: review_failedreview

comment:9 Changed 10 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

While the dialog layout is ok/acceptable, I've written some basic dt tests for this in t/3457:
http://ckeditor.t/dt/plugins/forms/textarea.html

Some tests are not passing.

While the tests may be related to things that are already present in the editor, by introducing the value field it makes too easy to identify the problems, so I think it's a good time to have them fixed as well.

comment:10 Changed 10 years ago by Frederico Caldeira Knabben

Status: review_passedreview_failed

Sorry, wrong action.

comment:11 Changed 10 years ago by Frederico Caldeira Knabben

Ok, I've updated the tests and we have in fact just problems with <textarea> data. The following cases:

<textarea>Line 1
Line 2</textarea>
<textarea>    Spaces before.</textarea>
<textarea>Spaces after.   </textarea>

Both line breaks and extra spaces get lost.

As said earlier, as the field is now available, it's pretty easy to set textarea data and these issues will come to the eyes immediately, especially the line breaks issue. Therefore, better to get it fixed as well.

Changed 10 years ago by Alfonso Martínez de Lizarrondo

Attachment: testWhitespaceTextarea.html added

testcase

comment:12 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Status: review_failedreview

The testcase shows that new lines at the start are respected only by Opera, all the other browsers ignore them. Besides that, IE (tested just 8) also ignores new lines at the end. Fixing those issues seems too complex as it's just the innerHTML property the one that fails there.

The patch adjust the htmlParser\fragment.js to try to respect the whitespace just like done in PREs

Changed 10 years ago by Alfonso Martínez de Lizarrondo

Attachment: 3457_3.patch added

patch for fragment.js

comment:13 Changed 10 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.2
Status: reviewreview_passed

Patches 2+3 look pretty good now. All tests passing.

comment:14 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: review_passedclosed

Fixed with [7236]

Note: See TracTickets for help on using tickets.
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy