Ticket #1205 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Style must be removed from collapesed selection

Reported by: fredck Owned by: fredck
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: Core : Styles Version:
Keywords: Cc:

Description

If the selection is collapsed inside some styled text, clicking on the style button must remove the style. For example, suppose we have the following situation, where "|" represents the selection position:

This is <b>some <i>s|ample</i><b> text.

In this case, the "Bold" button will be "on" in the toolbar. By clicking in the button, the bold style must be removed, resulting in:

This is some <i>s|ample</i> text.

This behavior is true only if the selection has text around it. If we are at the style element boundaries, we should simply move the selection outside of it. For example:

This is <b>|some <i>sample</i><b> text.
  or
This is <b>some <i>sample|</i><b> text.

Must change it to:

This is |<b>some <i>sample</i><b> text.
  or
This is <b>some <i>sample</i><b><i>|</i> text.

To note that in the second situation, other styles must continue active, using the same rules defined for it when applying styles to collapsed selections (generating the tags only if text is typed).

Change History

comment:1 Changed 7 years ago by fredck

  • Status changed from new to assigned
  • Owner set to fredck

comment:2 Changed 7 years ago by fredck

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

Fixed with [849].

Click here for more info about our SVN system.

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