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: Added a couple more attachments & cleaned up step 11 & 12 ------------------------------------------------------------------------------ 1. Make sure that Fred (the FCK Editor) is in the `lenya/webapp/lenya/resources/fckeditor` directory. This can be downloaded from http://www.fckeditor.net/. Remove any unnecessary folders and files in the fckeditor directory (anything that begins with an â_â). - 2. Download [attachment:invokeEditor.js] to `lenya/webapp/lenya/resources/fckeditor` + 2. Download [attachment:invokeEditor.js] to a new `lenya/webapp/lenya/resources/fckeditor` directory. 3. Add the following to `lenya/webapp/lenya/resources/fckeditor/fckconfig.js` after the line `FCKConfig.ImageDlgHideAdvanced` (around line 112): @@ -36, +36 @@ this.Height = height || '100%' ; }}} - 4. Also in `lenya/webapp/lenya/resources/misc/fckeditor`, create a new file called `uploadComplete.xhtml` that contains just beginning and ending `<html>` tags. The remaining html will be added during the transformation. This is the response that's sent to Fred after an asset has been uploaded which contains the name of the file being uploaded and an error code. + 4. Download [attachment:uploadComplete.xhtml] and [attachment:index.xhtml] to `lenya/webapp/lenya/resources/misc/fckeditor`. These file are just simple container pages. The remaining html will be added during the transformations. `index.xhtml` is the container for the editor page itself, and `uploadComplete.xhtml` is the response that's sent to Fred after an asset has been uploaded which contains the name of the file being uploaded and an error code. 5. Add the following actions to `sitemap.xmap`: @@ -315, +315 @@ * [attachment:savedContent.xsl] - 11. Download [attachment:FredSaveAction.class] (source [attachment:FredSaveAction.java]) to WEB-INF/classes/org/apache/lenya/cms/cocoon/acting/ to make a new Action that saves the content to a temporary file. + 11. Download [attachment:FredSaveAction.java] and [attachment:UploadFredAsset.java] into build/lenya/src/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. - This code is basically the same as `org.apache.lenya.cms.cocoon.acting.OneFormEditorSaveAction.java`, with a few modifications. Validation needs to be added here. + 12. Rebuild Lenya (run lenya.sh or lenya.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). - 12. Download [attachment:UploadFredAsset.class] (source [attachment:UploadFredAsset.java]) to WEB-INF/classes/org/apache/lenya/cms/cocoon/acting/ to make a new Action that uploads an asset to the page's asset directory. When creating the Publication, one of the parameters required is the context. Right now, this is hard coded. I have yet to figure out a way to get this. Obviously, hard coding is not the solution - still working on this. Thinking about putting the context in a properties files somewhere. Most of this code was taken from the action `org.apache.lenya.cms.cocoon.acting.UploadAction.java` and modified to work with Fred. + 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 get Fred to work with all your pubs, you will need to copy `usecase-fckeditor.xmap` to each publication. (Or can we put usecase-fckeditor.xmap into a lenya/usecases/fckeditor directory for all publications???) + TODO: Validation needs to be added to `FredSaveAction.java`. - There are a lot of steps here, and this is still very much a work in progress, but should get the basics of Fred working. In addition, I'm sure there's a better way to get the lenya tags in the document when saving rather than hard coding them in the xsl file. The `fckeditor-usecase.xmap` also needs to be cleaned up. Any suggestions or comments are welcome! + TODO: When creating the Publication, one of the parameters required is the context. Right now, this is hard coded. I have yet to figure out a way to get this. Obviously, hard coding is not the solution - still working on this. Thinking about putting the context in a properties files somewhere. + To get Fred to work with all your pubs, you will need to copy `usecase-fckeditor.xmap` to each publication. (Or can we put `usecase-fckeditor.xmap` into a `lenya/usecases/fckeditor` directory for all publications???) + + There are a lot of steps here, and this is still very much a work in progress, but should get the basics of Fred working. In addition, I'm sure there's a better way to get the lenya tags in the document when saving rather than hard coding them in the xsl file. The `fckeditor-usecase.xmap` also needs to be cleaned up, and there are some unneeded files generated by copying bxe directories. Any suggestions or comments are welcome! + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
