Ticket #5911 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

BIDI: List items should support and retain correct base language direction

Reported by: damo Owned by: tobiasz.cudnik
Priority: Normal Milestone: CKEditor 3.4
Component: General Version:
Keywords: IBM Review+ Cc: satya, joek

Description

It should be possible to set correct base language direction for graphical items such as numbered and bullet lists.

When creating a list from some existing content, the new list should retain the original language direction.

e.g. the following selection

<p dir="rtl">
   Line 1 <br/>
   Line 2 <br/>
   Line 3 <br/>
</p>

should become

<ul dir="rtl">
	<li>asdasdsadas</li>
	<li>sdfsdfsdfsdfsdf</li>
	<li>sdfsdfsdfsdfsdfsdf</li>
</ul>

the operation should also be reversible.

Attachments

5911.patch (1.1 KB) - added by tobiasz.cudnik 4 years ago.
5911_2.patch (2.3 KB) - added by tobiasz.cudnik 4 years ago.
5911_3.patch (2.3 KB) - added by tobiasz.cudnik 4 years ago.

Change History

comment:1 Changed 4 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from new to assigned

Changed 4 years ago by tobiasz.cudnik

comment:2 Changed 4 years ago by tobiasz.cudnik

  • Keywords Review? added

I will implement dialog extensions for language direction selection together with table element.

comment:3 Changed 4 years ago by fredck

  • Keywords Review- added; Review? removed

Ok, the provided solution is simplistic, but good for the generic usage case. It works well when "creating" lists, but the fix for the opposite, "removing" lists, is still not there, so we loose the dir attribute when removing lists.

Changed 4 years ago by tobiasz.cudnik

comment:4 Changed 4 years ago by tobiasz.cudnik

  • Keywords Review? added; Review- removed

comment:5 Changed 4 years ago by fredck

  • Keywords Review- added; Review? removed
// Should we set DIR attribute on this one ?

Well... more or less...

We don't need the dir creation on that "else" block, but we can instead simply force it entering on the "if" block if "dir" is defined. In that case, it'll create a <div dir="...">.

comment:6 Changed 4 years ago by fredck

Additionally, it looks like the code throws error in IE when creating an editor.

comment:7 follow-up: ↓ 8 Changed 4 years ago by tobiasz.cudnik

  • Keywords Review? added; Review- removed

I hope i've got you point right adding the variable dir to the condition. It doesn't seem to cause any issues.

I can't reproduce any problem on IE after testing all 3 versions of it. Could you please drop some hint about it ?

Changed 4 years ago by tobiasz.cudnik

comment:8 in reply to: ↑ 7 Changed 4 years ago by fredck

Replying to tobiasz.cudnik:

I can't reproduce any problem on IE after testing all 3 versions of it. Could you please drop some hint about it ?

Sorry, my confusion. This problem is with #5909.

comment:9 Changed 4 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:10 Changed 4 years ago by tobiasz.cudnik

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

Fixed with [5677].

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