Ticket #864 (new New Feature)

Opened 3 years ago

Last modified 6 weeks ago

Make subscript/superscript switchable

Reported by: virtimus@… Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: IBM SF Discussion Cc: fredck, JoeK, dchojna@…

Description (last modified by martinkou) (diff)

I've observed strange behaviour when switching between subscript/superscript (concerns situations when both are switched on). Added this to fcknamedcommand (start of execute function):

if (((this.Name=='Subscript') &&
(!FCK.EditorDocument.queryCommandState('Subscript')))
|| ((this.Name=='Superscript') &&
(!FCK.EditorDocument.queryCommandState('Superscript')))) {
FCK.ExecuteNamedCommand('RemoveFormat');
}

and voila - subscript/superscript works fine ...


Moved from SF:
 http://sourceforge.net/tracker/index.php?func=detail&aid=1428321&group_id=75348&atid=543656

Change History

follow-up: ↓ 4   Changed 3 years ago by martinkou

  • cc fredck added
  • description modified (diff)
  • reporter changed from martinkou to virtimus@…

Well... actually it is not an error to have such situation. Many will tell you that this is necessary. For example:

x<sup>B<sub>1</sub></sup>

The above is ok. Actually there is a limitation in the editor as it is not able to include a subscript inside another subscript!

But ok, we are not proposing a formula editor here... maybe the "switchable" approach is better?! Any thoughts?

I'm moving it to the Features Requests therefore.


Moved from SF. Original poster: fredck

  Changed 2 years ago by w.olchawa

  • keywords Discussion added

  Changed 7 weeks ago by alfonsoml

  • cc JoeK, dchojna@… added
  • keywords IBM added

#5083 has been marked as dup

in reply to: ↑ 1   Changed 6 weeks ago by JoeK

If the user clicks the subscript button, then the superscript button, while the same text is selected the result is: <sup><sub>text</sub></sup>. In this scenario can the sub element be removed, and the subscript button deselected.

Note: See TracTickets for help on using tickets.