Opened 8 years ago

Closed 5 years ago

#3457 closed New Feature (fixed)

There is no way to add textarea content

Reported by: arczi Owned by: alfonsoml
Priority: Normal Milestone: CKEditor 3.6.2
Component: UI : Dialogs Version:
Keywords: Cc: Saare, garry.yao, c10h15n

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 alfonsoml 5 years ago.
Proposed patch
3457_patch_-_FF4_Screenshot.png (10.6 KB) - added by fredck 5 years ago.
3457_2.patch (3.5 KB) - added by alfonsoml 5 years ago.
Increase dialog height
testWhitespaceTextarea.html (1.5 KB) - added by alfonsoml 5 years ago.
testcase
3457_3.patch (1.9 KB) - added by alfonsoml 5 years ago.
patch for fragment.js

Download all attachments as: .zip

Change History (19)

comment:1 Changed 7 years ago by arczi

  • Keywords Confirmed added
  • Milestone changed from CKEditor 3.x to CKEditor 3.1

comment:2 Changed 7 years ago by fredck

  • Milestone changed from CKEditor 3.1 to CKEditor 3.x

comment:3 Changed 7 years ago by alfonsoml

  • Cc Saare garry.yao added

#5748 and #5295 have been marked as dups

comment:4 Changed 6 years ago by fredck

  • Milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

comment:5 Changed 6 years ago by alfonsoml

  • Cc c10h15n added

#6113 has been marked as dup

Changed 5 years ago by alfonsoml

Proposed patch

comment:6 Changed 5 years ago by alfonsoml

  • Owner set to alfonsoml
  • Status changed from confirmed to review

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 5 years ago by fredck

comment:7 Changed 5 years ago by fredck

  • Status changed from review to review_failed

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

Changed 5 years ago by alfonsoml

Increase dialog height

comment:8 Changed 5 years ago by alfonsoml

  • Status changed from review_failed to review

comment:9 Changed 5 years ago by fredck

  • Status changed from review to review_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 5 years ago by fredck

  • Status changed from review_passed to review_failed

Sorry, wrong action.

comment:11 Changed 5 years ago by fredck

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 5 years ago by alfonsoml

testcase

comment:12 Changed 5 years ago by alfonsoml

  • Status changed from review_failed to review

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 5 years ago by alfonsoml

patch for fragment.js

comment:13 Changed 5 years ago by fredck

  • Milestone set to CKEditor 3.6.2
  • Status changed from review to review_passed

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

comment:14 Changed 5 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [7236]

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