Created attachment 2746 [details] A screenshot of the editor working on my system A WYSWYG editor for Koha news. Will be submitting a patch which adds this functionality using elRTE editor from elrte.org which is BSD style licensed. Had to tweak its default css file a little for it to play with Koha. A screenshot is attached.
TinyMCE is already used by Koha for editing inline help. We should either use TinyMCE everywhere or we should agree on another choice. I think WYSIWYG is a nice idea for News, but I don't want to see two competing editors.
(In reply to comment #1) As it happens I am aware of TinyMCE being already in Koha. But try as I might I could not get it to play nice ( read - at all ) with the News page. I tried the jquery varient of TinyMCE too and no go. Also I dont like the fact that the imagemanager etc of TinyMCE are only for paid customers. elRTE worked pretty well. Had to do some tweaks to its css etc. I have cleaned up the patch. Divided it into two separate patches. One for the elRTE library and one for the Koha changes I did. Now both apply squeaky clean. Got all features like image, media insert etc working now. Attaching both the patches here.
Created attachment 2749 [details] [review] [PATCH 1/2] Bug 5401: WYSWYG for Koha News Patch 1 eltre-1.1 library This patch adds the eltre-1.1 library from elrte.org which is BSD style licensed. This library is for use in WYSWYG editor for Koha staff client news editor. I have tweaked the eltre css file elrte.full.css to get the buttons to display properly in Koha. I have also removed the src directory, the changelog, readme and eltre.html files to reduce patch size and get rid of whitespace errors. I have also used a sed one liner on the eltre dir to get rid of trailing whitespace errors.
Created attachment 2750 [details] [review] [PATCH 2/2] Bug 5401: WYSWYG for Koha News Patch 2 Koha files This patch adds WYSWYG editor functionality to Koha news in staff client using elRTE editor from elrte.org which is BSD style licensed. elrte.inc file to configure the elRTE WYSWYG editor from elrte.org By using the opts array you can control the appearance of the buttons as well as size of the text area. For options of the opts array and others to control the appearance of the editor, refer to eltre.org. This header file is inserted in the koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
Some more thoughts about these patches: - This introduces another copy of jQuery, version 1.4.2. We should coordinate this patch with a Koha-wide upgrade of jQuery (Bug 5184). Having two copies of jQuery is not desirable. - This adds the jQueryUI library is a "custom" form, but it's not clear what dependencies are included. jQueryUI is on the list for inclusion in 3.4+, but we still need to have a discussion out in the open about what components to include by default.
I see now that the inclusion of jquery and jqueryUI are the result of the way the editor is distributed. The elRTE site says that the jqueryUI components which are required are dialog and tabs, which I'm sure we'll include in any Koha-wide jqueryUI implementation. I note that it is not required that you use the bundled versions of jquery and jqueryUI, although the elRTE site doesn't explicitly say what versions are required. On the other hand, I was able to get TinyMCE running just fine on the Koha News page by doing a simple cut and paste from the edithelp template. For me that's a big plus for TinyMCE: Why switch when broader integration isn't a problem?
Created attachment 2763 [details] [review] Demonstrating TinyMCE integration This patch demonstrates that a cut and paste of TinyMCE integration code from edithelp.tmpl adds a rich text editor to Koha News with no configuration changes.
(In reply to comment #7) > Created attachment 2763 [details] [review] > Demonstrating TinyMCE integration > > This patch demonstrates that a cut and paste of TinyMCE integration code from > edithelp.tmpl adds a rich text editor to Koha News with no configuration > changes. Nice. ( Why didn't I think of copy paste? ) The only objection I have is TinyMCE's policy of having some of their code such as Image insert as commercial only.
This bug is mentioned in: Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/012981.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/012982.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/012997.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/012999.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013000.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013001.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013005.html Discussion of development topics, was: Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013008.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013022.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013026.html Bug 5401: WYSWYG for Koha News http://lists.koha-community.org/pipermail/koha-patches/2010-November/013030.html
I have tested the TinyMCE patch from Owen, and it works like a charm.
Pushed, please test
This bug is mentioned in: Bug 5401, WYSIWYG for Koha news: Testing TinyMCE http://lists.koha-community.org/pipermail/koha-patches/2011-March/014347.html