Problems adding media

14 posts, 0 answers
  1. Robert
    Robert avatar
    11 posts
    Member since:
    Nov 2007

    Posted 22 Jan 2008 Link to this post

    Hey,

    I've been trying to add media using the media manager. It seems as though SharePoint is stripping away the tags in a publishing site.

    Even if I add it manually in the HTML it does that too.

    Is there a setting that I need to do to stop this?

    Thanks,

    Robert.
  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 23 Jan 2008 Link to this post

    Hello Robert,

    In the WCM (publishing) scenario you will also need to add / set the AllowSpecialTags property of the field editor to true. You can set it in the current page using SharePoint Designer. Click here for more information

    The property will override the MOSS filters and it will allow you to insert flash, media, and iframe objects.

    Best wishes,
    Lini
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  3. Robert
    Robert avatar
    11 posts
    Member since:
    Nov 2007

    Posted 28 Jan 2008 Link to this post

    Here's an interesting question.

    What is stored exactly in the 'text' of something which stores the media?

    I have a web part which basically pulls and displays the text. The embedded media tag comes out in a scramble of an alphanumeric string.

    What do I have to do to format my text properly when I output it?
  4. Robert
    Robert avatar
    11 posts
    Member since:
    Nov 2007

    Posted 28 Jan 2008 Link to this post

    Specifically, what do I do to render this information and convert it into embedded media?

    <pre style="display:none" id=RadEditorEncodedTag></pre>

    Thanks.
  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 29 Jan 2008 Link to this post

    Hi Robert,

    The special tags are encoded (Base64) to prevent MOSS content filters from changing/removing them. To decode the content, you need to write a function on the server, which decodes the field's string value before it is displayed in your web part. Here is some sample code:

    private static string UnEscapeSpecialTags(string html)  
    {  
        MatchEvaluator meTags = new MatchEvaluator(DecodeMatch);  
        string fixedHtml = Regex.Replace(html, "<pre\\s+(style=\"display\\s*:none\"\\s*)?id=\"?RadEditorEncodedTag\"?[^>]*>([^<]+)</pre>", meTags, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.ECMAScript);  
        return fixedHtml;  
    }  
    private static string DecodeMatch(Match m)  
    {  
        string nodeContent = m.Groups[2].Value;  
        try 
        {  
            byte[] byteContent = Convert.FromBase64String(nodeContent);  
            string b64Content = System.Text.Encoding.UTF8.GetString(byteContent);  
            return b64Content;  
        }  
        catch (Exception)  
        {  
            return nodeContent;  
        }  
     

    We will include support for encoding/decoding the editor content in the next RadEditor for MOSS release so you will be able to call these functions directly.

    Greetings,
    Lini
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Robert
    Robert avatar
    11 posts
    Member since:
    Nov 2007

    Posted 31 Jan 2008 Link to this post

    Okay, well ... what plug-in do I need to watch these pieces of media?

    IE can play mp3s perfectly fine but ... Firefox doesn't have any support for it?
  7. George
    Admin
    George avatar
    859 posts

    Posted 01 Feb 2008 Link to this post

    Hi Robert,

    You can use the Windows Media Player plug-in for Firefox that can be downloaded here.

    I hope this helps.

    Best regards,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Robert
    Robert avatar
    11 posts
    Member since:
    Nov 2007

    Posted 07 Feb 2008 Link to this post

    A new conundrum, I put:

    <object classid="..." codebase="http://..." version="..." width=300 height=400>
       <param name="width" value="20" />
       <param name="height" value="20" />
       <param name="flashvars" value="file ..." />
       <param name="src" value=" ..." />
       <embed type="application/x-shockwave-flash" width="350" height="20" flashvars="file=...."></embed>
    </object>

    That's when I click 'edit', then when I click design/view mode ... and then go back to edit.

    These tags get mangled. The flashvars field is destroyed and many other fields are inserted. What's the reason for this?
  9. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Feb 2008 Link to this post

    Hi Robert,

    Can you please provide some more information on the problem? If possible, please open a support ticket and send us the following:

    1. The exact object's code along with the flash file that you embed.
    2. Screenshots of the observed behavior
    3. the code that you get after going back in edit mode

    Thank you in advance for your cooperation.




    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Robert
    Robert avatar
    11 posts
    Member since:
    Nov 2007

    Posted 08 Feb 2008 Link to this post

    I can see that I'm becoming one of your favourite users.

    To step through this. I am NOT adding media using the tool button. I can adding flash manually using <object /> tags.

    The first image (sadly using ImageShack) is what it looks like when I first type it in.

    Image 1

    The second image is what happens when we go back to Design view

    Image 2

    This is a last look at the view source in the browser.

    Image 3


    Any reason why the editor is doing this to the tags?

    Thanks.
  11. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Feb 2008 Link to this post

    Hello Robert,

    Can you please make sure that you are using the latest version of RadEditor for MOSS? Currently it is v4.5.0 and can be downloaded from the RadEditor's downloads in the ClientNet account from which you have downloaded your version.

    I am asking you this because in RadEditor v7.3 we made some changes to avoid such problems and RadEditor for MOSS v4.5.0 is based on RadEditor v7.3. You can test the behavior of the control online on our demo.




    regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Stuart
    Stuart avatar
    13 posts
    Member since:
    Dec 2007

    Posted 13 Mar 2008 Link to this post

    Is it possible to enable special tags in the webpart too?
  13. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 14 Mar 2008 Link to this post

    Hi Stuart,

    In webpart scenario there is no need to set the AllowSpecialTags property as it is not needed there. Do you experience any problems with webparts?



    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  14. Stuart
    Stuart avatar
    13 posts
    Member since:
    Dec 2007

    Posted 14 Mar 2008 Link to this post

    Hi Georgi,

    I found the answer in another thread. I needed to set the AllowScripts property in ConfigFile.xml

    Cheers,

    Stuart.
Back to Top