Supersrcipt

General TRichView support forum. Please post your questions here
Post Reply
assantos
Posts: 1
Joined: Tue Jun 06, 2006 8:37 pm

Supersrcipt

Post by assantos »

How can i format superscript font in code
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Use VShift property of text style.
For example, you can find a modified "Editor2" demo with "subscript" and "superscript" commands here:
http://www.trichview.com/support/files/reditss.zip
jonjon
Posts: 467
Joined: Sat Aug 27, 2005 4:19 pm

Post by jonjon »

Well, that is a nice "workaround" but not a real solution. Imagine the user selects the whole text to change the size, then it will also change the super/sub scripts' sizes. Besides, that won't be correctly exported in HTML with the <sup> and <sub> tags.

Are you planning to implement those as native items, perhaps internally using the VShift property to save time ?

Regards,
John.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, it's planned for future, as a new property of text style.
But even the current solution will be exported to HTML as <sup> and <sub>
jonjon
Posts: 467
Joined: Sat Aug 27, 2005 4:19 pm

Post by jonjon »

Sergey Tkachenko wrote:But even the current solution will be exported to HTML as <sup> and <sub>
Oh, that's nice to hear! So I guess every stone is in place for the implementation then ;) Looking forward for that feature.

Regards,
John.
Post Reply