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

Problems adding media

13 Answers 159 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 22 Jan 2008, 07:51 PM
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.

13 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 23 Jan 2008, 07:50 AM
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
0
Robert
Top achievements
Rank 1
answered on 28 Jan 2008, 04:09 PM
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?
0
Robert
Top achievements
Rank 1
answered on 28 Jan 2008, 06:23 PM
Specifically, what do I do to render this information and convert it into embedded media?

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

Thanks.
0
Lini
Telerik team
answered on 29 Jan 2008, 08:08 AM
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
0
Robert
Top achievements
Rank 1
answered on 31 Jan 2008, 04:06 PM
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?
0
George
Telerik team
answered on 01 Feb 2008, 09:32 AM
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
0
Robert
Top achievements
Rank 1
answered on 07 Feb 2008, 06:49 PM
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?
0
Georgi Tunev
Telerik team
answered on 08 Feb 2008, 02:47 PM
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
0
Robert
Top achievements
Rank 1
answered on 08 Feb 2008, 03:40 PM
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.
0
Georgi Tunev
Telerik team
answered on 13 Feb 2008, 12:15 PM
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
0
Stuart
Top achievements
Rank 1
answered on 13 Mar 2008, 04:59 PM
Is it possible to enable special tags in the webpart too?
0
Georgi Tunev
Telerik team
answered on 14 Mar 2008, 09:27 AM
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
0
Stuart
Top achievements
Rank 1
answered on 14 Mar 2008, 03:26 PM
Hi Georgi,

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

Cheers,

Stuart.
Tags
WebParts for SharePoint
Asked by
Robert
Top achievements
Rank 1
Answers by
Lini
Telerik team
Robert
Top achievements
Rank 1
George
Telerik team
Georgi Tunev
Telerik team
Stuart
Top achievements
Rank 1
Share this question
or