More information on this that makes this less critical but still an issue:
In my jahia 404 installation, the HTML editor markup and tidy features
seemed to be switched
off by default so I did not realize this feature was there ... another
newbie issue - sorry!

However in 405, these are turned on and so I ran into this.
Once these are unchecked, things behave much better and I can accomplish the
scripting that
I need.  However, it is still the case that when I paste something with a
script into the
content area, I cannot later update it since what is displayed in the editor
(simple text
as well as HTMLArea) is not the same.   What I see is:

<input onclick="function anonymous()
{
function anonymous()
{
function anonymous()
{
executeCommands();
}
}
}" type="button" name="cmdNote" /> 

However, when I view the source of the saved page, it is correct.
This means that it is a "write-only" exercise to add complex HTML source
fragments and
therefore the source for these have to be maintained outside of Jahia - not
very satisfactory
for content management.

George.



-----Original Message-----
From: George Myers [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 25, 2005 10:13 AM
To: [email protected]
Subject: RE: Jahia405 simple text editor question

Tried "toggle HTML source" mode of the HTMLArea editor and of the ActiveX
editor.
It does not help - the result is still a javascript error when the content
is saved and the page is refreshed.
Then when I view the content in the the HTMLArea editor in source mode, or
in the simple text editor, I see the function is wrapped in a CDATA section.
This starts to look like something that has changed somewhere deeper than
the editor.
Any further suggestions or work arounds (for example, where can I go to look
at the saved HTML and perhaps remove the CDATA manually).

-----Original Message-----
From: Serge Huber [mailto:[EMAIL PROTECTED]
Sent: Friday, February 25, 2005 2:34 AM
To: [email protected]
Subject: Re: Jahia405 simple text editor question


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
>
>
>  
>

Reply via email to