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
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.
Iva Toteva
the Telerik team
Is there any documentation of it rather than the coded examples?
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