PDA

View Full Version : Rich text component


ugo.cei
11-24-2004, 08:34 AM
I'd like to develop a blogging and/or CMS client with Laszlo. For this, it would be nice to have a "rich" text input component. Ideally, it should be able to emit well-formed XHTML documents.

rufiao
12-18-2004, 02:23 PM
I second that.
Something functionally equivalent to HTMLArea (http://sourceforge.net/projects/itools-htmlarea/) would be wonderful.

ddemmer
01-26-2005, 12:18 PM
We're in need of a rich text editor component and short of developing our own in laszlo, can you use the HTMLArea html rich text editor within a laszlo app? Basically, I would like a laszlo app as a window that I can have rich ui functionality and then underneath (or part of) the canvas, have a htmlarea as our rich text editor and the persist the formatted html and pull in a new html area when a button is click from the laszlo app. So one would format some rich text, click a laszlo button and a new htmlarea would replace the existing formatted text with blank area and then the user could add more formatted text, click the button and that text would be persisted in a different object on the server.

Thanks,
David

antun
01-28-2005, 12:31 PM
With LPS 3.0 this might be feasible, as there will be ways of passing data from browser JavaScript to the Laszlo app. You could have the HTMLArea float over the Laszlo app (e.g. in an iframe) and pass its contents into it.

This would take some figuring out.

-Antun


We're in need of a rich text editor component and short of developing our own in laszlo, can you use the HTMLArea html rich text editor within a laszlo app?

hunterino
04-19-2005, 08:04 PM
I am trying to center multiline text, and It doesn't work.

<text text="Center this text across multimple linex"
multiline="true"
align="center"></text>

But a nice rich text edit would work as well

Cort
04-21-2005, 01:20 PM
Hi Folk,

I wonder if you could elaborate some more.

Apparently HTMLArea has been taken down and has been replaced by a list of similar tools.

Which features of the many options are most important to you? Is there one of those in the list that you prefer over the others? For what reasons?

For the blogging/CMS client what sort of data transfer mechanisms do you intend to use to store and save changes?

Are there some user cases you can think of that might be helpfull in the development of such a fellah?

The more detail the better. Thanks for any thoughts!

-Cort

ajagt
05-20-2005, 02:43 PM
This editor is amazing, compact, and cross platform.

I cannot recommend it highly enough.

www.fckeditor.net

Oh yeah, and it is completely free to use.

Arnold Jagt

ilanToren
06-20-2005, 09:01 PM
The editor is a nice interface for the creation of complex text, but there is still a need to parse html displayed within a openlaszlo text box so that it makes "sense".
For example links have to be wrapped as LzBrowser objects so that when the user opens the link it takes place in a new window and is pointed in the right place. For an experiment try inserting links. <a href="www.acme.com">acme</a> won't work while <a href="http://www.acme.com">acme</a> will work. And when it does work it essentially kicks the user out of the laszlo application.

You want to add a method like parseHTML( string) that will take valid html (perhaps with a tool like jtidy) and then wrap the tags appropriately. What do with thinks like tables and css style information? Should this be done client or server? (To maintain SOLO it should be done client). I'm starting to get ideas, but I'm curious what others think about this problem.

jon_loken
09-21-2005, 03:47 AM
Hi,
I may be missing something obvious here...

When experimenting, I was trying to refer to the javascript file used in the HTMLarea project into a lzx file like this:
<script src="htmlarea.js"/>

The error feedback refers to lines containing regular expressions like:
_editor_url = _editor_url.replace(/\x2f*$/, '/');

with the error message being:
"Syntax error: the token "/" was not expected at this position."

I tried escaping '/' (as '\/') and replacing single quotes with double quotes, but to no avail.

How does OpenLaszlo use javascript? Does it somehow take advantage of the browsers implementation or does OpenLaszlo have its own implementation? I guess it is the first one otherwise the Laszlo wrapper would be too large. Also why does Laszlo seemingly only use a small part of the Flash Player object model?

Could anyone shed light on the problem and/or tell me whether or not my attempts at using HTMLarea will fail.

Many thanks
Regards
Jon

Cort
09-21-2005, 06:15 AM
Hi Jon,

It has it's own implementation of Javascript which unfortunately doesn't have regular expressions.

There is a page at the very end of the developers guide with exactly what is left out. It's not much, regular expressions are the big thing, but because the flash player doesn't support them natively, they would be pretty slow as they would essentially be interpreted.

http://www.laszlosystems.com/lps-3.0/docs/guide/ecmascript-and-lzx.html

It is possible to use the browsers implementation of javascript, but then you open up the interface to all the browser variations again and in the end is only worth it if you really have to do it.

The reason they don't use the flash objects are twofold, the first is probably historic, they implemented all the nice language features like databinding and event handling long ago when the flash player was still at 5 and didn't have any of that. The other is that they still have other features like constraints that are integrated into the language, are really nice and would conflict with the flash object model. Actually there is a third which is that at this point there are a number of -- either problems or features -- depending on who you are, with the interior of Flash's object model that they would have to adopt. Oh and a fourth reason is that they want to put as standards oriented a wrapper as possible around the flash syntax so that they can implement laszlo in other runtimes as well and have the LZX language and api be the same.

Anyway, I blather. The flash textfields are inherrantly buggy as well and need to have some code wrapped around them to make them work well in any case. I think that the best move is to either use the html text control in a seperate window and communicate either with javascript or directly with the server with it, or to wait until they put out a component to do so.

Hope this helps, I didn't want to you burn a lot of CPU cycles on this as you basically won't be able to just port the code over directly.

-Cort