Online editors

Author Message

Paul Forsyth

Tuesday 28 October 2003 1:43:30 am

This thread will be a tracking thread for online editor progress, issues, bugs and other topics.

The documents:

http://ez.no/developer/ez_publish_3/documentation/incoming/developing_projects/online_editor
http://ez.no/developer/ez_publish_3/documentation/incoming/developing_projects/online_editor/online_editor_for_linux
http://ez.no/developer/ez_publish_3/documentation/incoming/developing_projects/online_editor/online_editor_for_windows
http://ez.no/developer/ez_publish_3/documentation/incoming/developing_projects/online_editor/online_editor_for_macintosh

contain the current status of the various online editors for eZ publish.

If you wish to join in please add this thread to your notifications.

Paul

Paul Forsyth

Tuesday 28 October 2003 2:00:05 am

Stéphane, thanks for your comments.

Do you have experience with <oXygen/>? It looks to me that its a stand alone xml editor, much like Morphon. If this is the case then it is more suited to a Desktop Edition of eZ publish ;)

Paul

Paul Forsyth

Wednesday 05 November 2003 4:25:08 am

I've had a quick look at html3-beta. Quite nice but it will take a little while to integrate with ez. It might be quite ez to get the html areas up and running but producing valid ez xml as output will take time.

Have a look at these pages:

http://dynarch.com/htmlarea/

and for installing:

http://dynarch.com/htmlarea/reference.html

I might try later this week if i have time to get something up and running.

paul

Eirik Alfstad Johansen

Wednesday 05 November 2003 5:02:24 am

I really hope you'll find the time, Paul! I accedently came across HTMLarea today, and I must say that, including the image manager and editor provided as add-ons (http://www.zhuo.org/htmlarea/), it makes for a pretty amazing web based WYSIWYG editor. The cross-browser compatibility also is a great plus.

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Thursday 06 November 2003 2:26:58 pm

Waay, i managed to get htmlarea3-beta to render itself on mozilla 1.4 on mandrake. still a few links to sort out but the basics are there. of course the html produced will not sync with ez xml but its a start.

but i was quite suprised at how simple it was. ill post the instructions if anyone wants.

if you want to test out your browsers capability with this tool goto:

http://dynarch.com/htmlarea/example-fully-loaded.html

paul

Eirik Alfstad Johansen

Thursday 06 November 2003 11:22:34 pm

> ill post the instructions if anyone wants.

That would be great, Paul. Looking forward to it.

Thanks in advance !

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Friday 07 November 2003 1:58:51 am

Ok, first download htmlarea-3-beta from sourceforge:

http://sourceforge.net/projects/itools-htmlarea/

unpack this within the extension directory of your ez install. I used 3.2-3 for this but any ez install would do i believe since for this 'get-up-and-running' example htmlarea only needs textareas to be present in the html code.

The extension dir is ok for now but again this example is not an ez extension. Extension is convenient.

Rename the directory 'HTMLArea-3.0-beta' to 'htmlarea' and make sure the directory and its files have the right permissions and groups for your server to read. A chown -R and chmod -R 755 is great.

Add these lines to your favourite pagelayout:

<script type="text/javascript" src="/extension/htmlarea/htmlarea.js"></script>
<script type="text/javascript" src="/extension/htmlarea/dialog.js"></script>
<script type="text/javascript" src="/extension/htmlarea/lang/en.js"></script>
<link rel="stylesheet" type="text/css" href="/extension/htmlarea/htmlarea.css" />

and modify the body tag to:

<body onLoad="javascript:HTMLArea.replaceAll();">

Now you need to edit one of the javascript files that comes with htmlarea. Edit htmlarea.js and look for the button list 'this.btnList'. You see many many references to images. We need to adjust the path here to allow these images to be found, so do a find and replace for 'images/' to '/extension/htmlarea/images/'. Save this file.

That should be it. Open up your admin, navigate to an object that has xmldata fields and edit it. You should see the htmlarea in operation. A folder or article will be fine.

The first obvious task is to cut down on the functions provided to the subset support in ezxml. The next larger one to customise the output.

You can call htmlarea on certain textareas if you wish, but you need to adjust the ezxmledit edit template as htmlarea requires each textarea to have an 'id' tag but at present they only have 'name' tags. Simple to fix.

I've found mozilla has a problem with the back button when htmlarea is present.

Im thinking of starting a project to look into this on pubsvn.ez.no. Eirik, want to help?

paul

Eirik Alfstad Johansen

Friday 07 November 2003 3:27:24 am

Hi Paul,

Thanks for the extensive instructions. I choose to put htmlarea in the site design folder instead, but that didn't seem to make any difference.

I'll be happy to help with a HTMLarea project where I can (though I'm still fairly new in the eZP game). Could you elaborate on what you have in mind?

Meanwhile, I'm experiencing a simple, yet significant problem with the HTMLarea/eZP which I was hoping you could shed some light on.

It seems that, when eZP stores the text in an XML textarea, it converts newlines to br tags. Then, when an existing XML text is to be edited, ezP converts the br tags back to newlines. (Either that, or the view mode for XML text converts new lines to br tags.) Also, it seems to totally ignore br tags alltogether if inserted into the xml textarea.

If I'm right in my assumption, I'm a little puzzled by this as it would strip the line breaks from perfectly valid XHTML code which, for instance, is cut and pasted from another file.

I can understand the reason for doing this, namely to make it easier to edit text if you're using a plain XML textarea. HTMLarea, however, seems to ignore all newlines, and even if it didn't, it wouldn't display newlines as actual line breaks in the preview area(and why should it?).

I've tried searching for the code validation process in HTMLarea with no luck. Also, I think it makes more sense to make this change in ezP, but where and how?

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Friday 07 November 2003 5:00:41 am

The problem isn't with eZ publish or htmlarea, rather each brower has its own way of entering markup. This is a bit of a show stopper since i believed markup could be controlled by htmlarea...

Mozilla, for example, likes to put in <br /> when the enter key is pressed. With ie i believe it is <p>. Reading the htmlarea forums has told me the problem lies in each brower's editing code. I've posted a message to the forum asking for more on this and whether htmlarea is able to override this behaviour.

I did find a workaround though. If you select the text you want paragraphed choose the 'normal' tedt heading size from the drop down menu. you may need to select a different heading then normal again to get this. If you look at the source ( the <> button) you will see your paragraphs but this doesn't really help with the new line issue.

Also, if you add code like this:

if (HTMLArea.is_gecko)
{
editor._iframe.contentWindow.document.execCommand("useCSS",false,true);
}

just underneath the line:

this.updateToolbar(); around line 1217 in the execCommand function, and before return false; line. This will switch off the use of css to format your code. So if you bold a line it will be now be wrapped in <b> tags instead of the mozilla <span style='font-weight.....' it defaults too.

As for helping it all depends on what time you have to contribute :) At the moment testing whats around and seeing what works and what doesn't is great. If code goes onto pubsvn then it would be great if you and others could simply test it. Good old constructive criticism :)

Hopefully i'll hear back from the forums soon.

paul

Paul Forsyth

Friday 07 November 2003 5:07:50 am

Just found this mozilla bug:

http://bugzilla.mozilla.org/show_bug.cgi?id=92686

Its a long standing problem.

paul

Paul Forsyth

Friday 07 November 2003 6:16:28 am

Just had a further think. It may be possible to get around most of these issues.

For example, midas will produce a <br /> between paragraphs. When submitting the textarea to ez it will attempt to transform the breaks into xml like this:

"
Line 1

Line 2
"

becomes

<paragraph>Line 1</paragraph>
<paragraph>Line 2</paragraph>

in ez xml. so, if code was written to transform the html into this and back again all would be well. as long as the code understands what the <br /> tag is doing.

browser checks would be needed for this. but its certainly possible. If mozilla release a new version with better midas support then we could adjust the code to support the new version as well as the old.

ill think more on it.

paul

Eirik Alfstad Johansen

Sunday 09 November 2003 9:34:41 am

Hi Paul,

Have you checked out this thread at InteractiveTools:

http://www.interactivetools.com/forum/gforum.cgi?post=19149

The fix mentioned, however, is for something called the Luis Editor (http://www.webstationone.com/test/htmlarea/index2.html) which I belive uses HTMLarea as basis.

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Monday 10 November 2003 1:37:02 am

argh, htmlarea 2.0 is ie windows only :( hope the author works on 3.0 :)

paul

Paul Forsyth

Monday 10 November 2003 8:54:29 am

Just to let you all know that there is a good discussion going on over on the mozilla bugzilla thread about paragraph breaks in moz.

http://bugzilla.mozilla.org/show_bug.cgi?id=92686

paul

Jeroen van Gorkum

Monday 10 November 2003 9:47:28 am

> [...] that there is a good discussion going
> on over on the mozilla bugzilla thread about
> paragraph breaks in moz.

and -because the moz editor devs seem hard to convince about the Right Way to proceed- i asked the tidy people if they can do anything about it, here:

[ 839280 ] needed: fix for mozilla editor proprietary line breaking, http://sourceforge.net/tracker/index.php?func=detail&aid=839280&group_id=27659&atid=390966

jeroen.

Clay Pereira

Wednesday 14 January 2004 1:30:22 am

Which Pagelayout.tpl do I use. I using the standard corporate template.

Eirik Alfstad Johansen

Wednesday 14 January 2004 2:02:15 am

That depends on where you want your WYSIWYG controls. If you want them at your user site (to help create forum msgs and so on) you edit the user (corporate) template. If you want them in the admin interface, you edit the admin template.

However, be aware that, with Paul's method of using htmlarea, all textareas will be replaced with a WYSIWY control, including the editing area for templates, and this causes a great deal of problems.

BTW Paul, have you found a fix for this and the "<p>" <> "\n" we've discussed earlier?

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Wednesday 14 January 2004 2:24:49 am

Not yet :( I haven't had the time to work on this im afraid.

But...

As mentioned, Mozilla is still the stumbling block. The latest on the bug report is that its being worked on. If you read the bug report discussion you will see that Mihai Bazon (the creator of HTMLArea) posted to it last week trying to push the Mozilla guys into fixing this quicker.

http://bugzilla.mozilla.org/show_bug.cgi?id=92686

paul

Eirik Alfstad Johansen

Friday 12 March 2004 7:05:23 am

Hi Paul,

The feature request for mozilla's line breaking behaviour has been updated. Would you care to comment on it? It's at:

https://sourceforge.net/tracker/?func=detail&atid=390966&aid=839280&group_id=27659

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Jeroen van Gorkum

Friday 12 March 2004 9:44:05 am

i should probably respond to the comment of the tidy people, because i requested the feature. i've been putting it off tho', waiting on approval of the bugfix for mozilla.

suppose this is fixed in mozilla 1.8. would there still be a need for a tidy `mozilla' switch, for mozilla versions before 1.8?

another reason i didn't reply to the tidy people yet, is that their question is kind of hard to answer. the problem with mozilla at the moment is that one [enter] creates a [br /] in the html code, while other editors insert [/p][p]. so, to fix this, tidy could replace all [br /] with [/p][p], but that would make it impossible to have linebreaks in your content. that's not much of a solution.

i'd like to hear if you have a better idea.

jeroen.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.