I am creating a widget snippet. We have the Javascript code. I am putting the javascript code in the Editlive after clicking on the Code tab.
On Saving the content item, clicking on INSERT/ Update button, the code disappears and nothing is saved in the Editlive field.
Not sure what is the reason, and again this is a fresh install of Rhythmyx Instance.
thanks
HTML Tidy (which is an open source software that has been out there for a long time, if you are unfamiliar) is run on insert/update/AA for all Ephox fields. So it is likely that it is getting stripped out by that. You can customize the behavior of this by editing: rxW2Ktidy.properties, so you may be able to get it retain the javascript by allowing the script element, but somehow I doubt that is even possible. Percussion engineering has a fix in the works which will allow you to wrap a CDATA around anything you won’t want Percussion to mess with, but that’s not out there yet that I know of. Other folks have had the same issues, if you search around in the forums, you will see.
Also, if you’re creating a widget content type, you should have a simple text area field for code that you plan on inserting. You can get as fancy with this as you want, but it simply boils down to this: you can’t use EditLive fields for anything exciting without major customizations, which, in most cases, aren’t really worth it.
I changed the control to sys_TextArea, and use the macro #displayfield to get the contents of the txt area…It is not giving anything back…