Page 1 of 1

Amazon Script

Posted: Thu Nov 13, 2008 9:44 pm
by Inner_space_70
Question: Why when I paste in a script from Amazon in the 'source' of a HTML Nugget then save it. Ill go back to look at it and the code has changed.

The code is not displaying the Amazon box correctly and Im wondering where to start looking..

Markup transformations is deselected and Im using the default WYSIWYG in source mode.

ORIGINAL
<SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceV ... 7918b2a72e"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceV ... Amazon.com Widgets</A></NOSCRIPT>

SAVED VER:
<script src="http://ws.amazon.com/widgets/q?ServiceV ... 7918b2a72e" type="text/javascript" charset="utf-8"></script><noscript />

Re: Amazon Script

Posted: Fri Nov 14, 2008 11:18 am
by garvinhicking
Hi!

When pasting javascript, do not use the WYSIYWYG editor. Temporarily disable it, save the nugget ,then re-enable it (and don't touch the nugget again).

The reason is that most WYSIWYG editors mangle iframe and script code, there is no way to refrain from it even in "source" mode.

Regards,
Garvin

Posted: Fri Nov 14, 2008 3:33 pm
by rj
Ah yes... I really knew that was the answer, but I didnt like it! :)

How about somethingn in the advanced options box? Or in taht markup turn off box?

turn off WYSIWHG editor for this message only CHECK!

I also wonder if there is a way toget Live Writer to push the message past the WYSIWYG editor?

Posted: Fri Nov 14, 2008 3:38 pm
by garvinhicking
Hi!

Once the WYSIWYG editor is loaded, you cannot simply turn it off again, you will always need to reload the full page.

I wouldn't know a techincal method how to provide such a checkbox without making the interface clumsy, reloading and always resetting to WYSIWYG once you re-open the nugget.

Usually, inserting javascript into a nugget only occurs rarely and by advanced users. I think those can switch the editor off as long as they do this maintenance. I believe if we were to turn off the WYISWWYG editor also for the common user, that would have too high an impact on daily usage.

Regards,
Garvin

Posted: Fri Nov 14, 2008 4:34 pm
by rj
Yes you are correct that it matters only occasionally when its about plugins. Like right now I am spending a few days designing sidebars so it comes up all the time. But when I am done, I probalby wont mess it again for most of a year...

But I do a lot of video embedding and some of the code is horrid. All NBC sites whether iframe or object, just a mess...

So I run into it everyday...

Let me make sure on this... I do a script nugget in the basic editor. If I want to edit it and save it again, I can do that from that basic editor and will not screw it up like it would editing in saving questionalbe code in WYSIWG Im screwed...

In my other post I thought putting a NEW ENTRY WITHOUT WYSWYG line below NEW ENTRY would be way cool! :) Which from what you said, would reload the admin page...

But then again, how many bloggers are embeding questionalbe video code. Probably not enough to matter...

Well it helped a little.

Posted: Fri Nov 14, 2008 8:44 pm
by Inner_space_70
I turned off the WYSIWYG editor but still see wierd results.

I can get a google and 'a few' Amazon widgets but not the ones I was trying to do.

Im thinking now maby its an issue with the theme Im running.

ex: If i say show me 1 book it works now. But if I say show me 3 vertically it shows scrambled. No matter what the width.

Ill just make do with what I can. Still learing my boundrys with the software.. ;-)