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

Extending the RadRichTextBox object model

3 Answers 84 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 06 Jul 2011, 04:45 PM
Is extending the RadRichTextBox object model a scenario that is technically possible? What I am talking about is creating new inline objects in order to enable embedding other content but images. For example I would like to add the ability to introduce a video and audio element based on the RadMediaPlayer.

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 07 Jul 2011, 12:18 PM
Hello Oliver,

Extending the document model on your end is not possible, as much of the code depends on the current elements hierarchy. We have planned to introduce custom inlines and blocks, but this has not been scheduled yet.
When it comes to embedding custom controls, this can be done with the help of InlineUIContainers. In the upcoming Q2 release or soon after that, we will also add floating UI containers, similar to the floating images that were implemented for the Beta. You can review them in our online demo.

Greetings,
Iva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Oliver
Top achievements
Rank 1
answered on 07 Jul 2011, 12:23 PM
Thanks for your reply. Unfortunately that doesn't answer my question wether the desired functionality I have outlined can be implemented or not (including saving and loading).

Let me elaborate a bit to make things a bit clearer. What I basically want to do is to enable the user to insert hyperlinks into the document that link to Word or PDF document and present those links with bit nicer UI. The user should also be able to add hyperlinks to videos which are then presented in the document using a media player element rather than the standard link ui. Shouldn't this be achievable using some post loading transformation? The only question is how that's gonna work out when saving the document.
0
Iva Toteva
Telerik team
answered on 13 Jul 2011, 08:24 AM
Hi Oliver,

The contents of the InlineUIContainers are serialized as XAML by default. Thus if you would be persisting the contents of the document in XAML, loading and saving the documents should word out of the box in most cases. However, since RadRichTextBox's main focus is editing rich text, the scenario with embedding and persisting media has not been that thoroughly tested. If this does not work for you please let us know.

When it comes to having a link to the media player, this could be accomplished in a slightly different way. Rather, you can have a Bookmark around the media player (the elements' order in the Inlines of a Paragraph being {BookmarkRangeStart, InlineUIContainer, BookmarkRangeEnd}). Then, you can have a hyperlink point to this bookmark.
Does this answer your question?

All the best,
Iva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
RichTextBox
Asked by
Oliver
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Oliver
Top achievements
Rank 1
Share this question
or