cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject RE: Configuring the HTMLarea for table operations
Date Tue, 07 Sep 2004 06:10:56 GMT
Hugo

I am using IE.  I previously noted the issue with using HTMLarea
inside of a table, and am using <div> tags for all my layout of
the form/s that requires HTML area.   

Yes, the  "initTable()" is called "inline" - this is the standard
code generated the supplied Cocoon stylesheets as a result
of:

    <fi:styling type="htmlarea" rows="15" style="width:90%;">
      <initFunction>initTable</initFunction>
     </fi:styling>

Any other ideas why it might be unhappy ?

Derek

PS I have just tried this in Mozilla 1.7.1 and I get the same
problem...


>>> hugob@xs4all.nl 2004/09/06 05:36:19 PM >>>
Hello Derek,

Is this true for IE or for other browsers as well? If you are not using
IE,
you can skip this email. If it is IE, are you using tables to display
your
HTMLArea? IE has some problems with inline Javascript initialization
in
table cells. The result will be a plain textarea, just like your
result.
According to some hints I found on the net, you have to move the
initialization to the "onload()" of the <body> tag. From your code
below I
guess that your "initTable()" will be called "inline" and not in the
"onload()" of the body. But let me repeat: this is only true for IE; 
it
only happens when your HTMLArea is in a table cell; it is a bug in IE;
and
if this applies to you, you should decide for yourself whether you want
to
work around it.

Hugo Burm


> -----Original Message-----
> From: Derek Hohls [mailto:DHohls@csir.co.za] 
> Sent: Monday, September 06, 2004 4:54 PM
> To: users@cocoon.apache.org 
> Subject: Configuring the HTMLarea for table operations
>
>
> If anyone has experience with the problem below,
>  I'd appreciate hearing a solution..
>
> I have modified the forms-htmlarea-styling.xsl to
> include the following  - inserted after the line:
> <script type="text/javascript"
> src="{$resources-uri}/htmlarea/htmlarea.js"></script>
>
>     <script type="text/javascript" >
>       //reconfigure HTMLArea toolbar
>       function initTable(areaID) {
>         // inititalize editor
>         edit = new HTMLArea("editor");
>         edit.registerPlugin(TableOperations);
>         // retrive the config object
>         var config = edit.config;
>         config.statusBar = false;
>         // do custom configuration
>       	config.toolbar = [
>       		[
>       		  "bold", "italic", "underline",
> "strikethrough",
> "separator",
>       		  "subscript", "superscript", "separator",
>       		  "justifyleft", "justifycenter",
> "justifyright",
> "separator",
>       		  "insertorderedlist",
> "insertunorderedlist", "outdent",
> "indent", "separator",
>       		  "createlink", "separator", "undo",
> "redo", "paste"  ]
>       	];
>         HTMLArea.replace(areaID,config);
>       }
>     </script>
>
> The form template page is then configured to use it
> for a textarea as follows:
>
>    <fi:styling type="htmlarea" rows="15" style="width:90%;">
>      <initFunction>initTable</initFunction>
>     </fi:styling>
>
> However the HTMLarea does not work at all (ie. get a plain
> textarea) UNLESS I remove the line:
>       edit.registerPlugin(TableOperations);
>
> Obviously I want to add in all the functionality of table
> operations found in the TableOperations javascript as
> well to the config.toolbar, but cannot do so until the
> plugin is working....
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message