Embed code mangled by editor?

Embed code mangled by editor?

by Flosi Kristjánsson -
Number of replies: 4

In order to save space on our Moodle server I store some material on issuu.com. The text I copied into a web page was as follows. It did not work out, so I looked at the code again in the Moodle editor ----> see second screen dump 

As you can see, the code has bee truncated somewhat and it appears to be much shorter. Is there an explanation?

Average of ratings: -
In reply to Flosi Kristjánsson

Re: Embed code mangled by editor?

by Paul Jacobson -

Hi Flosi - the ISSUU publication is a cherished resource for us. Many PDF files and Powerpoint presentations have been converted to ISSUU and stored in a Private Library on their servers. The code for embedding a publication is generated by ISSUU itself:

<div>
<object style="width: 600px; height: 225px;">

<param name="movie" value="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fcolor%2Flayout.xml&backgroundColor=FFFFFF&showFlipBtn=true&documentId=101116131940-90987ee5e510476c8073babfab979966&docName=how_to_optimise&username=smartadata&loadingInfoText=How%20to%20for%20Moodle&et=1289915309416&er=43" />

<param name="allowfullscreen" value="true" />

<param name="menu" value="false" />

<embed src="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf" type="application/x-shockwave-flash" allowfullscreen="true" menu="false" style="width: 600px; height: 225px;" flashvars="mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fcolor%2Flayout.xml&backgroundColor=FFFFFF&showFlipBtn=true&documentId=101116131940-90987ee5e510476c8073babfab979966&docName=how_to_optimise&username=smartadata&loadingInfoText=How%20to%20for%20Moodle&et=1289915309416&er=43" />
</object>

<div style="width: 600px; text-align: left;"><a href="http://issuu.com/smartadata/docs/how_to_optimise?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fcolor%2Flayout.xml&backgroundColor=FFFFFF&showFlipBtn=true" target="_blank">Open publication</a> - Free <a href="http://issuu.com" target="_blank">publishing</a> - <a href="http://issuu.com/search?q=moodle" target="_blank">More moodle</a></div></div>

The HTML editor in both 1.9 and 2.01 does not tamper with it. The HTML code placed in a Label appears as a "thumbnail" of the cover; and the user double-clicks for a full screen view. That's it!

We prefer the Firefox browser and in IE, we always run in compatibility mode. The only problem we have had is when ICT blocks Flash on a student  network.

In reply to Paul Jacobson

Svar: Re: Embed code mangled by editor?

by Flosi Kristjánsson -

Apparently my editor truncates the HTML-code at a certain point:

After it says: <param name="movie" /> the http value that should appear there is "swallowed" by the editor. Also the HTML tag embed src simply disappears.

I have checked this by pasting the embed code into the editor and also into Notepad (for comparison). I click on the update button in the editor and save. There is no thumbnail, so I open up the editor again. and the text has more or less disappeared. This happened after the upgrade. Pages created this way in 1.9 work OK, but if I open them in the editor I destroy them.

This is what I am left with:

<p>Þetta er textinn:</p>
<div>
<object style="width: 420px; height: 295px;">

<param name="movie" />
<param value="true" name="allowfullscreen" />
<param value="false" name="menu" />
</object>
<div style="width: 420px; text-align: left;"><a target="_blank" href="Open" _mce_href="http://issuu.com/menntasvid/docs/skolastarf_ggo?mode=embed&amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml&amp;showFlipBtn=true">Open">http://issuu.com/menntasvid/docs/skolastarf_ggo?mode=embed&amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml&amp;showFlipBtn=true">Open publication</a> - Free <a target="_blank" href="publishinghttp://issuu.com">publishing</a> - <a target="_blank" href="More" _mce_href="http://issuu.com/search?q=education">More">http://issuu.com/search?q=education">More education</a></div>
</div>

 

In reply to Flosi Kristjánsson

Svar: Re: Embed code mangled by editor?

by Flosi Kristjánsson -

Case closed: Apparently the problem described may be attributed to a quirk in Internet Explorer 8, the way it is set up for users on my network. When I embed the issuu code using Firefox on the same network, everything works fine.

See; http://grunnskolar.eduspoke.com/ and the link Skolastarf a nyrri old which displays a paper that the previous head of Reykjavik's LEA presented on schools in the new millenium.

Average of ratings: Useful (1)
In reply to Flosi Kristjánsson

Re: Svar: Re: Embed code mangled by editor?

by Paul Jacobson -

There you go - blame the Browser. As I mentioned, we prefer Firefox, especially for designing Courses. IE seems to work OK in compatibility mode; and you should also test your Courses in Chrome, Safari and even Opera. The HTML editor responds a little differently in each one - so stick with Firefox for stability.

In www.W3Schools.com you can find a table that lists incompatibilities among the Browsers. Well written HTML usually contains variations to accomodate these differences.