Re: Jahia405 simple text editor question

Serge Huber <[email protected]>
Newsgroups gmane.comp.cms.jahia.install
Message-ID <[email protected]>
Hi George,

Maybe you could try using the <HTML> mode of one of the new editors 
(such as HTMLArea) to solve your problem ?

Regards,
  Serge Huber.

George Myers wrote:

>In Jahia 405, can anyone suggest how to embed javascript script in HTML
>using the "add text"
>function other than putting it inline directly on the "onclick" event of a
>link or control.
>The latter is is fine for very simple things but is difficult to work with
>for anything more
>complex.  Is there any way to prevent the CDATA modification to the script.
>
>In the 404 version I was able to "add text" by pasting in html using the
>simple text editor.   When saved the content looked as expected.  There was
>a drawback
>in that the content could not be edited so you needed to delete and
>re-create when
>changing.  What also was allowed was the use of embedded script fragments.
>This allows
>doing very useful things like launching desktop programs on the intranet
>from a button on
>the portal.  The simple file shown below could be pasted in as-is, complete
>with <html> tags
>and it worked out fine.   Now it creates a syntax error in IE version 6 that
>is 
>caused by wrapping the function in a CDATA section like:
>
><script type="text/javascript">
><![CDATA[
>function executeCommands()
>{
> alert("here");
>}
>]]>
></script>
>
>Here is the original script.
>-----------------
><html>
><body>
>
><script>
>function executeCommands()
>{
> alert("here");
>}
></script>
><CENTER>
>Boilerplate &nbsp;
><INPUT onclick=executeCommands();
>type=button value="Run script" name="cmdNote">
></CENTER>
>
></body>
></html>
>------------
>
>George Myers
>
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.