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 BobHarner: http://wiki.apache.org/lenya/HowToIntegrateFCKEditor The comment on the change is: Changed to use %LENYA_HOME% instead of "lenya/webapp", combined steps 11 & 12. ------------------------------------------------------------------------------ This is still very much a work in progress. This will get the famous FCKeditor (which we have nicknamed "Fred" to reduce snickering) to load with content, save the content, and link to assets. However, validation still needs to be implemented when saving, and the asset upload portion is not quite ready. We've only tried this with Lenya 1.2.3/1.2.4 and FCKeditor 2.0/2.11. Full credit for all this goes to K. Haenni. - 1. Download Fred (the FCK Editor) from http://www.fckeditor.net/. Extract the ZIP or tar file into `lenya/webapp/lenya/resources/. The ZIP or tar file will contain files starting with a "FCKeditor/" directory, so after extracting, rename "FCKeditor" to "fckeditor". + Throughout this text, the variable `%LENYA_HOME%` will refer to the main Lenya directory (i.e. the subdirectory `/lenya/webapp` of the complete Lenya application) and `%PUB_HOME%` will refer to the directory of your working publication (i.e. `%LENYA_HOME%/pubs/{yourpub}/`). - 2. Download [attachment:invokeEditor.js] into that same `lenya/webapp/lenya/resources/fckeditor` directory. + 1. Download Fred (the FCK Editor) from http://www.fckeditor.net/. Extract the ZIP or tar file into `%LENYA_HOME%/lenya/resources/. The ZIP or tar file will contain files starting with a "FCKeditor/" directory, so after extracting, rename "FCKeditor" to "fckeditor". + 2. Download [attachment:invokeEditor.js] into that same `%LENYA_HOME%/lenya/resources/fckeditor` directory. + - 3. Add the following to `lenya/webapp/lenya/resources/fckeditor/fckconfig.js` after the line `FCKConfig.ImageDlgHideAdvanced` (around line 120): + 3. Add the following to `%LENYA_HOME%/lenya/resources/fckeditor/fckconfig.js` after the line `FCKConfig.ImageDlgHideAdvanced` (around line 120): {{{ // Need to get the publication id and doc id from the cookie. @@ -34, +36 @@ }}} - 4. Edit `lenya/webapp/lenya/resources/fckeditor/fckeditor.js` as follows: + 4. Edit `%LENYA_HOME%/lenya/resources/fckeditor/fckeditor.js` as follows: a. Set the height and width of the editor (near the top) to: @@ -49, +51 @@ IMPORTANT: Also set `this.BasePath` to start with your servlet context root (e.g. '/lenya/fckeditor/...') if you aren't using Jetty or your servlet context is not "/". - 5. Download the following files to `lenya/webapp/lenya/resources/misc/fckeditor`: + 5. Download the following files to `%LENYA_HOME%/lenya/resources/misc/fckeditor`: * [attachment:uploadComplete.xhtml] @@ -69, +71 @@ </map:pipeline> }}} - 7. Download [attachment:fckeditor.xmap] to `lenya/webapp/lenya/` + 7. Download [attachment:fckeditor.xmap] to `%LENYA_HOME%/lenya/` - 8. Download [attachment:usecase-fckeditor.xmap] to `lenya/webapp/lenya/pubs/pubname/`. + 8. Download [attachment:usecase-fckeditor.xmap] to `%LENYA_HOME%/lenya/pubs/pubname/`. - 9. Add the following line to `lenya/pubs/pubname/config/menus/generic.xsp` after + 9. Add the following line to `%LENYA_HOME%/lenya/pubs/pubname/config/menus/generic.xsp` after `<item wf:event="edit" uc:usecase="bxeng" uc:step="open" href="?"><i18n:text>Edit with BXE</i18n:text></item>` (around line 127): {{{ @@ -82, +84 @@ Alternatively, if you want to *only* use the FCKeditor, comment out the other editors in generic.xsp and give the FCKeditor item a label like "Edit Page". - 10. Copy `lenya/webapp/lenya/xslt/bxeng/*` to `lenya/webapp/lenya/xslt/fckeditor/`, then download the following files to that new directory: + 10. Copy `%LENYA_HOME%/lenya/xslt/bxeng/*` to `%LENYA_HOME%/xslt/fckeditor/`, then download the following files to that new directory: * [attachment:aggregate.xsl] (replacing existing file) @@ -94, +96 @@ * [attachment:savedContent.xsl] + 11. If you are building Lenya from source, download [attachment:FredSaveAction.java] and [attachment:UploadFredAsset.java] into `src/java/org/apache/lenya/cms/cocoon/acting/`. These are new actions to save edited content and save uploaded files to the page's asset directory, respectively, and rebuild Rebuild Lenya (run build.sh or build.bat). This should automatically compile the java classes from the previous step. If you are *not* building lenya from source (i.e. you downloaded the Lenya binary) just download [attachment:FredSaveAction.class] and [attachment:UploadFredAsset.class] into `%LENYA_HOME%/WEB-INF/classes/org/apache/lenya/cms/cocoon/acting/`. - 11. Download [attachment:FredSaveAction.java] and [attachment:UploadFredAsset.java] into src/java/org/apache/lenya/cms/cocoon/acting/. These are new actions to save edited content and save uploaded files to the page's asset directory, respectively. - - 12. Rebuild Lenya (run build.sh or build.bat). This should automatically compile the java classes from the previous step. Alternatively you can download [attachment:FredSaveAction.class] and [attachment:UploadFredAsset.class] to /lenya/webapp/WEB-INF/classes/org/apache/lenya/cms/cocoon/acting/ (no Lenya rebuild being required in that case). Note: `FredSaveAction.java` and `UploadFredAsset.java` are basically the same as `org.apache.lenya.cms.cocoon.acting.OneFormEditorSaveAction.java` and `org.apache.lenya.cms.cocoon.acting.UploadAction.java`, with a few modifications. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
