This is a migrated thread and some comments may be shown as answers.

RadDocument (Span Tags)

4 Answers 62 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 13 Feb 2012, 06:32 PM

Good evening,

Is it possible to assign tags to the "Span" element in a RadDocument (or something similar)?

For example :

<telerik:Span Tag="myValue" Text="Hello world" />

I'm trying to construct a document where the data is drawn from a database. Some how I need to assign a value to each span so that I can identify which database row ID it belongs to. Quite difficult to explain.

Thank you for your time,

Rob




4 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 15 Feb 2012, 02:27 AM
Are bookmarks a way of essentially wrapping tags around elements?
0
Iva Toteva
Telerik team
answered on 16 Feb 2012, 01:41 PM
Hi Rob,

It is not possible to add tags to the span elements of the document. The way the document is split into Spans depends only on the formatting of the text and spans are split and merged when editing a document in the control and custom properties are not preserved.

You have guessed right that using Annotations would be the best approach in such a scenario. You can preview the new Structured Content Editing demo for Silverlight. It describes the implementation and persistence of custom annotation ranges. Bookmarks are a type of annotations, but by implementing your own set, you can add different properties and persist them in the document. Furthermore, your annotations will not be visible to the BookmarksManagerDialog and the InsertHyperlinkDialog.

Kind regards,
Iva Toteva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Robert
Top achievements
Rank 1
answered on 17 Feb 2012, 02:23 AM
Thank you Iva, I will look into this.
Is there any documentation of it rather than the coded examples?
0
Ivailo Karamanolev
Telerik team
answered on 20 Feb 2012, 01:38 PM
Hello,

We have prepared a blog post on that matter, however it is not publicly released just yet. I'm attaching a work-in-progress version, so that you can get a better picture of the feature. Let us know if you need anything additional.

All the best,
Ivailo Karamanolev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
RichTextBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Iva Toteva
Telerik team
Ivailo Karamanolev
Telerik team
Share this question
or