Forums / Developer / SJSD WYSIWYG editor based on FCKEditor for ezxmltext

SJSD WYSIWYG editor based on FCKEditor for ezxmltext

Author Message

liu spider

Moderated by: Nicolas Pastorino

Wednesday 12 April 2006 8:56:35 am

This thread is for the project SJSD (contribute: http://ez.no/community/contribs/applications/sjsd_real_fckeditor_xmltext_integration )

Please ask your questions in this thread rather in the contribution section.
If you do not expect replys, please add comment in the contribute section :)

<b>HOWTO DEBUG this extension</b>
As the nature of this project, there are two main sources of bugs: javascript running in client side and the server side php scripts

DEBUG Javascript:
*Firefox (at least 1.5) comes with a javascript console, and it can give precise information about where and why some commands in the javascripts fail.

*IE: without Microsoft script editor/debugger, the error message is basically useless. One of them is recommanded (Microsoft script debugger is free for downloading).

DEBUG PHP:
When using the editor, there are two buttons at the end of the toolbar: the first one will show the current html source of the editor. The second one is more interesting: onloading, it will communicate with ez publish server to get the converted xml from the current html source. There will be a button "Output" after the xml is displayed, it will ask the server to convert the xml back to html, and show it in the window. After this, a ok button will appear, which can be used to set the new generated html back to the sjsd editor.

<b>BEFORE REPORT BUGS</b>
Please check bugs and "feature requests" sections in our homepage: http://sf.net/projects/scim
if it is not there, you can file one (the prefered method), or state it here

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Brian LaFleur

Wednesday 12 April 2006 11:56:57 am

any hints on troubleshooting this extention? I installed it on 3.7.6 and when I edit an article, no editior is visible. I am using firefox. I do see the enable editor button, when enable it, still no editor is visible.

liu spider

Wednesday 12 April 2006 12:09:12 pm

Javascript console in firefox will tell you what's wrong with the code (ignore all css related ones)

anyway, I will release a new version very soon, which fixed a lot of bugs, include IE compatibility issues.

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Xavier Dutoit

Wednesday 12 April 2006 1:45:31 pm

New version on the svn as sourceforge. according to the log it fixes the ie problem.

I'll tell you how it works on my side soon.

X+

http://www.sydesy.com

Xavier Dutoit

Wednesday 12 April 2006 2:00:05 pm

Problem report:

Error: eZTemplate @ extension/sjsd/design/standard/templates/content/datatype/edit/ezxmltext.tpl:40[33] Apr 12 2006 22:51:52

Unknown template variable 'attribute_base' in namespace 'ContentAttribute'

Otherwise, nothing show. Liu, are you using this extension with a virtual host config ? Might need a few changes in the mod_rewrite rules

X+

http://www.sydesy.com

liu spider

Wednesday 12 April 2006 2:13:48 pm

Oops, it was a stupid bug, have no idea why it did work here. What's your ez publish version?

fixed in svn, please have a try

As a matter of fact, I did not try this in virtual host environment, but I am trying to make sure it works no matter which it is installed

you may need to add rewrite rules to permit accessing *.xml directly

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Siniša Šehović

Thursday 13 April 2006 6:09:38 am

Hi liu

You did a great job!!

I do have one small problem :-)
After installing SVN version I can see editor but can't publish anything :-)

After pressing publish button I am redirected to:

http://my.site/content/edit/2874/5

What could be wrong?

Best regards,
S.

---
If at first you don't succeed, look in the trash for the instructions.

liu spider

Thursday 13 April 2006 8:19:42 am

when you talk about svn, could you please state the revision number?

you did not mention what's your setup like and before you click publish what's the editing address

BTW: the svn is now pretty usalbe

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Brian LaFleur

Thursday 13 April 2006 9:24:05 am

Hi, Installed the latest r26 . In the java console I see an error that says;

Error: FCKeditor is not defined
Source File: http://corp-admin.web:8085/content/edit/138/25
Line: 383

Do I need to configure this somewhere?

liu spider

Thursday 13 April 2006 9:42:25 am

you use virtual host, so you have to make sure *.html and *.xml and *.js can be accessed directly

so please modify your rewrite rules

BTW: the INSTALL file is updated as well in svn

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Gabriel Ambuehl

Thursday 13 April 2006 10:52:22 am

Do you happen to have a demo of that somewhere?

Visit http://triligon.org

liu spider

Thursday 13 April 2006 11:26:27 am

To Gabriel Ambuehl:
sorry, not at this moment, will probably setup one in future

never knew you started a similar project based on xinha nearly half year ago, if I had known it, I would investigate it before starting SJSD

your xinha project and SJSD share some goals and they also differ in some significant ways. As I see it, in xinha it store xhtml directly into database, while SJSD try to store it as native ezxml.

I do not know OE, but xmlarea does not overwrite the ezxhtml output handler and it does try to convert xhtml to native ezxml (as SJSD is inspired by xmlarea, it follows the same pattern).

in SJSD, input handlers convert input xhtml using dom, and convert xhtml dom to native ezxml dom

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

liu spider

Thursday 13 April 2006 11:30:56 am

just checked demo site of eZ OE, it does use the default ezxhtml output handler as well

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Gabriel Ambuehl

Thursday 13 April 2006 12:49:58 pm

Exactly. When I set out to integrate Xinha, I tried to work with ezxml but it just felt much too limited to me, so I took the good features (name eznode:// ezobject:// linking) and implemented it in my generic XHTML backend.

Both surely have their uses.ezxml is more limited, but much stricter about what it allows (and also retains the ability to use things like PDF output [1]) whereas my approach allows for easy copy pasting from other apps and retains a lot of formatting (surprisingly, this even works on Linux these days).

In some ways, the XHTML approach is much more extreme and it's "impossible" (close to, anyway) to get back to ezxml from it. So in short, it does have it's uses but only for people who really do know what they are doing ;)

[1] Which I personally consider not very useful but others might differ.

Visit http://triligon.org

liu spider

Thursday 13 April 2006 2:30:32 pm

With more flexible, while storing the xml in a ezxml format is what SJSD striving to achieve

but it is a bit hard to found out the spec for ezxml, in fact besides the source code of simplified input handler, it is not stated anywhere.

As far as I can tell, custom tags can not have children node except #text, I just can not understand why eZ does not allow that.

I think I will not make SJSD obey this rule.

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Xavier Dutoit

Thursday 13 April 2006 11:12:50 pm

Hi Liu,

FYI, the simplified xml you see to input isn't the format used to store the xml.

See for instance Kirill's message:
http://ez.no/community/forum/suggestions/add_xhtml_datatype_replace_xml_datatype/(offset)/20

As you said, the problem is that we don't know what is allowed and what isn't in the simplified format, nor in the real storage format.

Based on my experience with clients randomly copy pasting content from different sources (including beloved html by ms word), it doesn't allow enough, even when valid (and legitimate) xhtml is inputed.

X+

http://www.sydesy.com

Siniša Šehović

Friday 14 April 2006 12:36:16 am

Hi liu,

I have svn rev34 and still have the same problem.
If I try to publish I am redirected to edit.

What do you mean by "you did not mention what's your <i>setup</i> like and before you click publish what's the <i>editing address</i>"?

What could be wrong?
Do I have to set something extra in settings?

Best regards,
S.

---
If at first you don't succeed, look in the trash for the instructions.

Gabriel Ambuehl

Friday 14 April 2006 1:26:40 am

As soon as you want to allow more than is allowed in the default simple input handler the weirdness that lives in it begins to unfold. And the total lack of documentation doesn't exactly help, either.

If you want to deal with it after a few hours of trying to figure it out, respect. I didn't want to.

Visit http://triligon.org

liu spider

Friday 14 April 2006 7:06:10 am

To Xavier Dutoit:
Yes, I know that.

To Gabriel Ambuehl:
In fact, use the simplified input handler, and check the database directly, you will know what input should generate what output, which can shed some lights on the issue. Of course, I admit, document would be much better then "reverse engine"

To Sinisa:
do you have any warnings when you directed to edit page again?

Is your setup virtual host? when you edit it, what's the location displayed in your location bar of your browser? Do you use rewrite rule?

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Viktor Juhász

Friday 14 April 2006 10:40:30 am

Hi!

I have a problem with your extension: if I edit any content after press Publish button, the content disappears.

I use eZpublish 3.6.7-gpl, SJSD 0.2 and FCKEditor 2.2 on Windows XP. The Firefox's Javascript Error Console is not send any error message, exept CSS errors.

What's wrong? Any idea?

Best regards,

Beren