Re: Re: Re: ZMS-2.11/ZTinyMCE as plugin integration
Rainer Feigl <[email protected]>
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Message-ID | <[email protected]> |
i figured out why this worked. i set the editor for html to tinymce. so now i got the standard-no-editor stuff with a textarea, which tinymce converts to its own stuff. (therefore i have now 2 toolbars) ... strange, but works *g
rainer feigl
On Monday 06 April 2009 12:26:48 Rainer Feigl wrote:
> hi folks,
>
> tinymce actually works if i comment out the alternate textarea in manage_form.dtml, though i dont think, thats the way its supposed to be.
>
> <dtml-comment><textarea name="alternate_<dtml-var "REQUEST.get('elName')">" id="alternate_<dtml-var "REQUEST.get('elName')">" cols="50" rows="15" style="width:100%"><dtml-var "REQUEST.get('data')" html_quote ></textarea></dtml-comment>
>
> i'll post a clean(er) solution, after i got time to get a bit more into this. for now it works :-)
>
> rainer feigl
>
> ---------------------------------------------------------------------------------------------------------------
>
> Hello,
> [1] getHome() returns an object not a path
> [2] the JS error is due to the missing formatlist
> [3] the dtml
> http://bscw.hoffmannliebenberg.de/pub/bscw.cgi/d1194862/manage_form.dtml
> shows the principle (just for demo purposes: the code is based on
> xstandard and tinycme specific functionality / JS code is still
> missing - but it works:
> http://bscw.hoffmannliebenberg.de/pub/bscw.cgi/d1194866/tinycme.png
>
> I hope this example will help; maybe you send the complete solution
> back to the forum.
>
> Best regards
> fh
>
>
> --- In [email protected], "michael_schaefer_zeitec"
> <michael.schaefer@...> wrote:
> >
> > Dear ZMS-developers,
> >
> > we would like to integrate (Z)TinyMCE as ZMS-WYSIWYG-Editor
> (rte-plugin).
> >
> > Therefore we tried to use the new ZMS-plugin-concept. We installed
> > ZTinyMCE, created a manage_form.dtml-document in the directory
> > plugins/rte/tinymce. After a restart and adding the ZTinyMCE-poduct to
> > our Zope-instance we could switch to the new editor in
> > Configuration/Paragraph formats/Textbody.
> >
> > We got two problems:
> > First, although we changed to the new editor, the standard editor
> > buttonbar is still shown (now we have got to editors!?).
> >
> > Second, we are not able to save edited content, because of the
> > occuring error: "Feld 'Format' muß einen Wert haben!" (Dropdownmenu
> > 'Format' is given in the old standard editor).
> >
> >
> > Here our detailed steps we made to integrate TinyMCE.
> >
> > 1. Download ZTinyMCE from http://www.fry-it.com/oss/ZTinyMCE
> > 2. Install Product ZTinyMCE in zope/Products
> > 3. makedir zope/Products/zms/plugins/rte/tinymce
> > chown zope: zope/Products/zms/plugins/rte/tinymce
> > 4. cat <<EOF >zope/Products/zms/plugins/rte/tinymce/manage_form.dtml
> > <dtml-unless "REQUEST.get('f_zmiRichtextOnSubmitEventHandler')">
> > <dtml-call
> > "REQUEST.set('format',REQUEST.get('format',getFormat(REQUEST)))">
> > <dtml-if "REQUEST.has_key('format')">
> > <dtml-call "REQUEST.set('contentEditable','false')">
> > <dtml-call "REQUEST.set('data',renderShort(REQUEST))">
> > <dtml-else>
> > <dtml-call
> > "REQUEST.set('data',getObjAttrValue(getObjAttr('text'),REQUEST))">
> > </dtml-if>
> > <input type="hidden" name="format" value="<dtml-var format>">
> > <dtml-unless "REQUEST.get('tiny', False)">
> > <dtml-if tinymce.conf>
> > <dtml-var tinymce.conf>
> > <dtml-else>
> > <script language="javascript" type="text/javascript" src="<dtml-var
> > "getHome()">/TinyMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
> > <script language="javascript" type="text/javascript">
> > tinyMCE.init({
> > mode : "textareas",
> > theme : "advanced",
> > theme_advanced_toolbar_align : "left"
> > });
> > </script>
> > </dtml-if>
> > <dtml-call "REQUEST.set('tiny', True)">
> > </dtml-unless>
> > <dtml-call "REQUEST.set('f_zmiRichtextOnSubmitEventHandler',_.True)">
> > </dtml-unless>
> > EOF
> > chown zope: zope/Products/zms/plugins/rte/tinymce/manage_form.dtml
> > 5. zope restart
> > 6. add Product ZTinyMCE in your ZMS-instance
> > add tinymce.conf to your ZMS-instance
> > 7. change in ZMS:
> > content/Konfiguration/Absatzformate/Textkörper/Richedit to tinymce
> >
> >
> > Our environment: we are using Zope 2.11.1-final, python 2.4.4, linux2,
> > and ZMS 2.11.0-33 (Build #131d)
> >
> > We would be please if someone has got a solution or an alternative way
> > to implement TinyMCE.
> >
> > Many thanks
> > Michael Schäfer
> >
>