Insert HTML

3 posts, 1 answers
  1. Marciano
    Marciano avatar
    6 posts
    Member since:
    Jul 2010

    Posted 07 Jan 2011 Link to this post

    I want insert HTML code (youtube embed) inside the text, like hyperlink works today, is it possible?

    Html code
    <object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/WaN8w4Mplb4?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WaN8w4Mplb4?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
  2. Answer
    Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 12 Jan 2011 Link to this post

    Hi Marciano,

    You cannot insert custom HTML code in the document the way you want to. The idea of the Document Model is that at all times, the document represents a tree of Silverlight objects. This exactly is the job of HtmlFormatProvider - to map HTML elements to Silverlight objects. For a list of the supported tags in HTML you can refer to our help section.
    As it comes to playing video inside of RadRichTextBox, you can do that with the help of Silverlight's MediaElement like this:

    <telerik:RadRichTextBox Name="radRichTextBox">
            <telerik:RadDocument>
                <telerik:Section>
                    <telerik:Paragraph>
                        <telerik:InlineUIContainer Height="250" Width="350">
                            <MediaElement Source="http://ecn.channel9.msdn.com/o9/pdc09/wmv/CL07.wmv" AutoPlay="True" />
                        </telerik:InlineUIContainer>
                    </telerik:Paragraph>
                </telerik:Section>
            </telerik:RadDocument>
    </telerik:RadRichTextBox>

    You can also have a RadMediaPlayer inside of an InlineUIContainer.
    Let us know if that does not answer your question.

    All the best,
    Iva
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. Marciano
    Marciano avatar
    6 posts
    Member since:
    Jul 2010

    Posted 13 Jan 2011 Link to this post

    All right, that I'm trying one substitute for Windows Live Writer, when I saw the editor I thinking that maybe is possible.
    But ok.

    Tks for the reply.
Back to Top