Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change notification.
The following page has been changed by TimHannigan: http://wiki.apache.org/lenya/HowToIntegrateTinyMCEEditor ------------------------------------------------------------------------------ == Installation Instructions == + == About the Lenya/TinyMCE Integration == - === Example === + This documents describes the steps on how to get the open source WYSIWYG editor (TinyMCE) working + with the Lenya Content Management System. + + Download the attachment from the wiki and follow these instructions on how to get the editor integrated and working. + Please note that this integration is still very much a work in progress. + + + + == 1. == + + Edit file lenya/resources.xmap + + find this section of code, + {{{ - xxx + <map:pipelines> + <map:pipeline> + + <!-- Lenya Publications --> + <!-- matches pub-id/area/css/*.css --> + <map:match pattern="*/*/css/*.css"> + <map:read src="pubs/{1}/resources/css/{3}.css" mime-type="text/css" /> + </map:match> + + }}} + and paste in this code after it: + + {{{ + <!--start edit needed for tiny_mce --> + + <!-- matches pub-id/area/**.js --> + <map:match pattern="*/*/**.js"> + <map:read src="pubs/{1}/resources/{2}/{3}.js" mime-type="application/x-javascript" /> + </map:match> + + + <!-- end edit for tiny_mce --> + + }}} + + == 2. From the attachment package (will be on the Lenya Wiki), == + + Copy the contents of the + "copy contents to lenya/xslt" into your /lenya/xslt directory. + + + == 3. From the attachment package (will be on the Lenya Wiki), == + + Copy the contents of the + "copy contents to lenya/xslt" into your /lenya/usescases directory. + + == 4. Download the TinyMCE package from the website: http://tinymce.moxiecode.com/ == + + Extract the following directory from the TinyMCE distribution into your newly created (through the copy in step 2) + /lenya/usecases/tiny_mce directory + + jscripts + + == 5. == + + At this point, the TinyMCE editor should work for you. However, if you want to save and take advantage of the image preview list, you have to take the source files from the attachment package (on Lenya Wiki) directory "copy contents to java src directory" and copy them into your + /src/org/apache/lenya/cms/cocoon/acting directory. + Then you need to rebuild Lenya for it to take affect ( on Unix/Linux ./build.sh ) + + == TinyMCE config: == + + TinyMCE is really great in that you can configure plenty of options at runtime without modifying the source code. Look at the docs (http://tinymce.moxiecode.com/tinymce/docs/index.html) under "Configuration" for more info. + + In this Lenya integration, all the runtime config for TinyMCE is done in the /lenya/usecases/tiny_mce/xslt/aggregate.xsl file in the header. + There, you'll see my + + {{{ + <script language="javascript" type="text/javascript" src="{$contextprefix}tiny_mce/tiny_mce.js"> </script> + <script language="javascript" type="text/javascript"> + var imageList = "<xsl:value-of select="substring-before($root,'index_')" />image_list.js "; + var editor_content_css = "<xsl:value-of select="$editor_content_css" />"; + var focusWindow; + + tinyMCE.init({ + mode : "textareas", + theme : "advanced", + relative_urls : false, + .... + + }}} + + + where the config options are handled. + + As a tip, note that I was having some issues with tabbed whitespace in the config area. Eliminated the whitespace (nesting) fixed the problem, although I imagine using CDATA should also fix it. + === Still Unfinished === - xxx + Please note that this integration is still needing more work (especially with image and file callbacks). + It has only been tested on MacOSX and Solaris with Lenya 1.2.4. + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
