You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Julio C. Rivera" <Ju...@carm.es> on 2004/04/29 09:18:27 UTC

Htmlarea as Tapestry component

Hi!

Somebody has integrated HtmArea 
(http://www.interactivetools.com/products/htmlarea/) successfully as a 
Tapestry component and want to share that component?
I don't like to reinvent the wheel.

Thanks in advance.
    Julio.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Using Htmlarea as Tapestry component

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
There has been some discussion on how to use HTMLArea with Tapestry. I 
have a "working" solution, if anybody has a better one please share it. 
I have this setup so it will convert all TEXTAREA components on your 
page to HTMLAREA pretty much automatically.

First, download the latest 3.x version of HTMLAREA from 
http://www.interactivetools.com/products/htmlarea/

Expand the latest version of HTMLAREA so it is available from the 
/htmlarea section of your web server/servlet server. For me I expanded 
to <tomcat>/webapps/ROOT/htmlarea

Next, In the body of your html file have the following two lines appears 
ONE TIME:

    <script jwcid="@Any" language="JavaScript1.2" type="text/javascript" 
src="/htmlarea/htmlarea.js"></script>
    <span jwcid="htmlAreaScript"/>

Then one or more TEXTAREA components such as

    <form jwcid="mainForm">
        <textarea jwcid="testTextAreaA" cols="78" rows="12"/><br>
        <textarea jwcid="testTextAreaB" cols="78" rows="12"/><br>
        <span jwcid="submitSubmit"/>
    </form>

These are here to load the base javascript file and to include the 
script I wrote (will provide source for script later).

In the .page file

    <component id="htmlAreaScript" type="Script">
        <static-binding name="script" value="HtmlArea.script"/>
    </component>

Now how to handle the TEXTAREA components (and the submit)

    <component id="testTextAreaA" type="TextArea">
        <binding name="value" expression="testValueA"/>
    </component>
    <component id="testTextAreaB" type="TextArea">
        <binding name="value" expression="testValueB"/>
    </component>

Now HtmlArea.script

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script PUBLIC    "-//Howard Lewis Ship//Tapestry Script 
1.2//EN"    "http://tapestry.sf.net/dtd/Script_1_2.dtd">
<script>
  <body>
<![CDATA[
     //Setup global vars for the editor script
     var _editor_url = "/htmlarea/";
     var _editor_lang = "en";
        
     function editor_startup() {
       var config = new HTMLArea.Config();
       //Use can use this config to specify any configuration on the 
HTMLAREA
       HTMLArea.replaceAll(config);
     }
]]>
  </body>
  <initialization>
      editor_startup();
  </initialization>
</script>

When you load the page in the browser all TEXTAREAs should be converted 
to HTMLAREAs, easy!

If anybody can point out how to get rid of my "@Any" component in the 
.html file, I would appreciate it. I tried doing it dynamically in 
javascript by creating a script object and appending it to the head 
object, but, I couldn't make it work. Other suggestions are certainly 
welcome... It could certainly be a bit more elegant, but, I think this 
will largely serve my needs. Maybe some parameters to specify width of 
the HTMLAREA, etc.

Kevin


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: --- Potential SPAM ---: Re: Htmlarea as Tapestry component

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
I am working on it.

Kevin

stephen smithstone wrote:

> so has any one got to work with a tapestry page ?
>
> On 1 May 2004, at 04:16, Todd O'Bryan wrote:
>
>> I didn't have any luck using Safari on Mac OS 10.3, but both Firefox 
>> and Mozilla popped up the editor correctly.
>>
>> Todd
>>
>> On Apr 30, 2004, at 2:24 PM, Robert Zeigler wrote:
>>
>>> Kevin C. Dorff wrote:
>>>
>>>> Yeah that is beautiful. Too bad it doesn't support Mozilla or FireFox.
>>>>
>>>> Kevin
>>>>
>>>
>>> Check out version 3.0rc1. Works w/ any mozilla browser, v1.3 or 
>>> better (incl. firefox). =)
>>> http://sourceforge.net/projects/itools-htmlarea/
>>> The SF project page says OS: Microsoft, but I think that's just a 
>>> throwback from the earlier versions;
>>> I played with the "Everything but the kitchen sink" demo for awhile 
>>> the other day on linux+firefox 0.8 with
>>> no problems.
>>>
>>>
>>> Robert
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by stephen smithstone <sk...@lchost.co.uk>.
so has any one got to work with a tapestry page ?

On 1 May 2004, at 04:16, Todd O'Bryan wrote:

> I didn't have any luck using Safari on Mac OS 10.3, but both Firefox 
> and Mozilla popped up the editor correctly.
>
> Todd
>
> On Apr 30, 2004, at 2:24 PM, Robert Zeigler wrote:
>
>> Kevin C. Dorff wrote:
>>
>>> Yeah that is beautiful. Too bad it doesn't support Mozilla or 
>>> FireFox.
>>>
>>> Kevin
>>>
>>
>> Check out version 3.0rc1. Works w/ any mozilla browser, v1.3 or 
>> better (incl. firefox). =)
>> http://sourceforge.net/projects/itools-htmlarea/
>> The SF project page says OS: Microsoft, but I think that's just a 
>> throwback from the earlier versions;
>> I played with the "Everything but the kitchen sink" demo for awhile 
>> the other day on linux+firefox 0.8 with
>> no problems.
>>
>>
>> Robert
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
It allows itself to only work with specific browsers. You could download 
it and change the browser check to see if it will work with browser X.

Kevin

Todd O'Bryan wrote:

> I didn't have any luck using Safari on Mac OS 10.3, but both Firefox 
> and Mozilla popped up the editor correctly.
>
> Todd
>
> On Apr 30, 2004, at 2:24 PM, Robert Zeigler wrote:
>
>> Kevin C. Dorff wrote:
>>
>>> Yeah that is beautiful. Too bad it doesn't support Mozilla or FireFox.
>>>
>>> Kevin
>>>
>>
>> Check out version 3.0rc1. Works w/ any mozilla browser, v1.3 or 
>> better (incl. firefox). =)
>> http://sourceforge.net/projects/itools-htmlarea/
>> The SF project page says OS: Microsoft, but I think that's just a 
>> throwback from the earlier versions;
>> I played with the "Everything but the kitchen sink" demo for awhile 
>> the other day on linux+firefox 0.8 with
>> no problems.
>>
>>
>> Robert
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by Todd O'Bryan <to...@mac.com>.
I didn't have any luck using Safari on Mac OS 10.3, but both Firefox 
and Mozilla popped up the editor correctly.

Todd

On Apr 30, 2004, at 2:24 PM, Robert Zeigler wrote:

> Kevin C. Dorff wrote:
>
>> Yeah that is beautiful. Too bad it doesn't support Mozilla or FireFox.
>>
>> Kevin
>>
>
> Check out version 3.0rc1. Works w/ any mozilla browser, v1.3 or better 
> (incl. firefox). =)
> http://sourceforge.net/projects/itools-htmlarea/
> The SF project page says OS: Microsoft, but I think that's just a 
> throwback from the earlier versions;
> I played with the "Everything but the kitchen sink" demo for awhile 
> the other day on linux+firefox 0.8 with
> no problems.
>
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Kevin C. Dorff wrote:

> Yeah that is beautiful. Too bad it doesn't support Mozilla or FireFox.
>
> Kevin
>

Check out version 3.0rc1. Works w/ any mozilla browser, v1.3 or better 
(incl. firefox). =)
http://sourceforge.net/projects/itools-htmlarea/
The SF project page says OS: Microsoft, but I think that's just a 
throwback from the earlier versions;
I played with the "Everything but the kitchen sink" demo for awhile the 
other day on linux+firefox 0.8 with
no problems.


Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
Yeah that is beautiful. Too bad it doesn't support Mozilla or FireFox.

Kevin

stephen smithstone wrote:

> what a nice tool
> On 29 Apr 2004, at 08:18, Julio C. Rivera wrote:
>
>> Hi!
>>
>> Somebody has integrated HtmArea 
>> (http://www.interactivetools.com/products/htmlarea/) successfully as 
>> a Tapestry component and want to share that component?
>> I don't like to reinvent the wheel.
>>
>> Thanks in advance.
>>    Julio.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by Colin Sampaleanu <co...@exis.com>.
People might want to also look at Kupu:
  http://kupu.oscom.org/screenshots/
  http://kupu.oscom.org/


stephen smithstone wrote:

> what a nice tool
> On 29 Apr 2004, at 08:18, Julio C. Rivera wrote:
>
>> Hi!
>>
>> Somebody has integrated HtmArea 
>> (http://www.interactivetools.com/products/htmlarea/) successfully as 
>> a Tapestry component and want to share that component?
>> I don't like to reinvent the wheel.
>>
>> Thanks in advance.
>>    Julio.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Htmlarea as Tapestry component

Posted by stephen smithstone <sk...@lchost.co.uk>.
what a nice tool
On 29 Apr 2004, at 08:18, Julio C. Rivera wrote:

> Hi!
>
> Somebody has integrated HtmArea 
> (http://www.interactivetools.com/products/htmlarea/) successfully as a 
> Tapestry component and want to share that component?
> I don't like to reinvent the wheel.
>
> Thanks in advance.
>    Julio.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org