FCKeditor and embedded HTML content

Author Message

Geraint Edwards

Tuesday 14 June 2005 3:32:34 am

I have managed to setup FCKeditor to edit ezxmltext fields, placing the output between <literal class='html'> tags, I then use a template override for literal.tpl to distinguish between different literal types.

<b>The result is easy to create and and attractively rendered html content in articles etc.</b>

At the moment I display the textarea in addition to the FCKeditor IFRAME so you can always use the core ezxmltags for non-html output.

Does anyone see any problems with this approach? Is anyone interested in an explanation of how I did it?

If there is enough demand, I may try to put the whole thing together as an extension.

Geraint

kracker (the)

Tuesday 14 June 2005 2:04:07 pm

I can't speak for many other than myself.

I am curious to see this in action.
I think it would be a great example for the others.

Cheers,
//kracker

<i>man's best friend : form + prime matter = substance</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Gabriel Ambuehl

Wednesday 15 June 2005 12:04:27 am

Yeah I'd love to see it in action. As it's currently unknown if HTMLArea will be continued, FCKEditor would seem like the best alternative to it.

Visit http://triligon.org

Xavier Dutoit

Wednesday 15 June 2005 12:18:34 am

+1

Is that as feature rich as what stevo+ has done with htmlarea (upload images, browse nodes when creating a link...) ?

It'd be great if your two solutions could merge, I know stevo+ had a look at FCKEditor, don't know what was the result of his analysis.

X+

http://www.sydesy.com

Geraint Edwards

Wednesday 15 June 2005 1:13:58 am

FCKeditor is a very powerful WYSIWYG html textarea editor - see http://www.fckeditor.net/Demo/ for a non-ezPublish example.

It allows you to upload images (can probably be configured to place these where other ezpublish modules can get at them), cut/paste directly from MSWord (not much use to me on Linux though!), browse for links etc.

I don't yet have a publicly accessible implementation but here are some partial screen dumps:

http://www.copyn.plus.com/images/img1.png
http://www.copyn.plus.com/images/img2.png
http://www.copyn.plus.com/images/img3.png

Basically I can send content back and forth between the textbox and the FCKeditor.

Geraint

Geraint Edwards

Wednesday 15 June 2005 2:19:45 am

Ok - doing an extension was easier than I expected. I think everything is there - see :
http://www.ez.no/community/contribs/applications/fckeditor_integration

Size is far larger than it needs to be since it includes the whole of FCKeditor 2.0FC including the source code. I'll strip it down at a later date.

Xavier Dutoit

Wednesday 15 June 2005 2:27:43 am

Great,

Do you use svn ? It'd be great if you could contact Paul B to get an access and put it into the pubsvn.

X+

http://www.sydesy.com

Geraint Edwards

Wednesday 15 June 2005 8:47:16 am

For the benefit of those following this thread - I'd left some javascript out of the extension (this has now been remeied).

p.s Xavier I'm more comfortable with CVS! Will get in touch with Paul B and get this extension under source control.

Paul Borgermans

Wednesday 15 June 2005 10:04:46 am

Nice,

Using svn is not that hard actually. To set up an account, just email me at paul[dotty]borgermans[atty]sckcen[dotty]be

Regards

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

kracker (the)

Wednesday 15 June 2005 4:00:53 pm

Geraint,

Can you also post a brief changelog into your extension entry; screenshots of it in eZ publish site would be nice as well :)
<i>http://www.ez.no/community/contribs/applications/fckeditor_integration</i>

Similar perhapses to ... these?
<i>http://www.ez.no/community/contribs/applications/assign_banners_to_sections
http://www.ez.no/community/contribs/applications/xmlarea</i>

cheers,
//kracker
<i>man's best friend : little bank anthem</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Geraint Edwards

Wednesday 29 June 2005 12:59:03 am

I have modified the extension description to point out you may need to modify .htaccess/conf files to allow an xml file from the extension to be delivered by the server.

John Axsom

Friday 08 July 2005 10:47:58 am

Hi Geraint,

Could you post the modifications that may be necessary to get FCKeditor to work?

I'm a noob and all I've done so far is activated the extension in the ez admin but I don't see the editor when I go to add/edit xmltext fields.

Thanks,
John Axsom

Geraint Edwards

Saturday 09 July 2005 5:55:29 am

The name of the extension is casesensitive and cannot be changed without rooting around for hard references - so double check the installed name of your extensions.

Have you setup the autoload in Site.ini as described i.e.:

[TemplateSettings]
ExtensionAutoloadPath[]=fckeditor

Does your .htaccess allow through xml files?

Check by loading http://<i>YourURL</i>/extension/fckeditor/FCKeditor/fcktemplates.xml

Do you have any other template overrides for xmltextarea edit that may be interfering?

Its a good idea to clear the cache (especially template compilation and ini caches).

Hope these pointers help.

Lydie Soler

Monday 11 July 2005 1:24:31 am

Hi I have set my site.ini correctly.
I can see the xml file with the url you mentionned.

But I have this error:

Operator 'writefck' is not registered

Can you explain me how to set my http.conf to allow through xml files? in case there is still something to do....

I have no other extension overriding the xml area. And I have cleared caches....
Thanks a lot for your help

Geraint Edwards

Monday 11 July 2005 1:52:47 am

Lydie

If you can see the xml file then you shouldn't need to modify the httpd.conf.

"writefck" is a custom template function that should be registered by the

[TemplateSettings]
ExtensionAutoloadPath[]=fckeditor

entry in your site.ini file. For some reason this registration is not happening in your setup - but the error message shows you are accessing the correct template file!

Can you double check the extension name is correct and it is installed in the correct place - namely <i>Your root dir</i>/extension/fckeditor/

and that you have added the ExtensionAutoloadPath[] entry to your ini file.

Hope this helps - if not let me know and I'll try to think of some more possible causes.

Lydie Soler

Monday 11 July 2005 2:09:30 am

Well,

after some correction (I had not added the extension to the admin site.ini ....) I have now the following error:

Not Found

The requested URL /extension/fckeditor/FCKeditor/editor/fckeditor.html was not found on this server.
Apache/2.0.52 (Red Hat) Server at metarisk2 Port 80

I can see the 2 buttons (copy FCKeditor to textbox, copy textbox to FCKeditor)

any idea....

if I look to my directories I can't see any spell errors and I can find the html file...

Geraint Edwards

Monday 11 July 2005 3:23:33 am

You say that the html file is in the correct place - this suggests that your .htaccess/httpd.conf file doesn't allow html files through?

Can you read the html file in a browser directly?

Lydie Soler

Monday 11 July 2005 3:28:59 am

well if I use the same method as for the xml file in a browser I don't get any error... I can see a blank page with some thin border (just as if it was a cell of a table with a border....)

Lydie Soler

Monday 11 July 2005 3:47:38 am

I have found that I have this following Javascript error when I am editing an article....
Erreur : editform is not defined
Fichier Source : http://metarisk2/metarisk2/index.php/site_unite_metarisk_admin/content/edit/333/36/fre-FR
Ligne : 737

Though this may help
Thanks for your help

Geraint Edwards

Monday 11 July 2005 5:17:49 am

The only reference I ca find in ezpublish to editform is in the xmlarea extension - this will be trying to work in the same edit scenario as the fckeditor and would explain the error you are seeing.

Try disabling xmlarea by commenting it out as an active extension and an autoloadtemplate. You should be able to reinstate it easily by commenting out fckeditor and uncommenting the xmlarea entries (if that make sense!).

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