Opened 17 years ago

Closed 17 years ago

#1205 closed Bug (fixed)

Style must be removed from collapesed selection

Reported by: Frederico Caldeira Knabben Owned by: Frederico Caldeira Knabben
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 (2)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Owner: set to Frederico Caldeira Knabben
Status: newassigned

comment:2 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [849].

Click here for more info about our SVN system.

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