Sample code for bold text

110 views
Skip to first unread message

tom

unread,
Jan 18, 2011, 5:19:35 AM1/18/11
to ModelText
Christopher,

do you have sample code for setting/resetting the selected range to
bold or something similar? I've got it working for simple cases, but
it turns out that not all cases are simple... eg: when the selection
spans a non-bold and a bold text, or when the selection spans only a
part of an already bolded text.

Just thought before I spend too much time trying to figure it out, you
might already have something working.

Thanks!
Tom

Christopher Wells

unread,
Feb 4, 2011, 10:43:01 AM2/4/11
to ModelText, anta...@googlemail.com
Hi Tom,

Well done for getting it working for the simple cases: I take it that
you used the code in the sample program, for inserting hyperlinks, as
your starting point for inserting other types of element like <bold>.

I don't have any sample code for editing the more complicated cases
involving multiple, overlapping, and/or nested inline elements;
although the renderer will support (render) these more complicated
paragraphs.

If you do implement code like that, I'd be happy to look at it, and to
add it to the sample program.

Regards,
Christopher Wells.
Reply all
Reply to author
Forward
0 new messages