http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11584
--- Comment #2 from David Cook <[email protected]> --- Created attachment 40509 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40509&action=edit Bug 11584 - Add wysiwyg editor to system preferences dealing with HTML This patch adds the ability to use a WYSIWYG editor for system preferences. The key files that I touch are: 1) admin/systempreferences.pl 2) koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt 3) koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt I also add: 4) koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc and 5) koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage This plugin is part of the TinyMCE distribution. It used to be in Koha, but then someone removed it. It's useful for preferences like "opacheader" though. -- _TEST PLAN_ Before applying: Note that there is no WYSIWYG editors for system preferences and that it's not an option when creating a new local system preference. Apply the patch. After applying: 1) Go to Global System Preferences 2) Go to "Local use" 3) Create a new system preference with a variable type of "Htmlarea". 4) Click "Save" 5) Note that your system preference has a WYSIWYG editor instead of a textarea or some other type of input field. 6) Enter some content, bold it, insert images, etc. 7) Click "Save" 8) Reload the page 9) Note that your content is still there 10) Find koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref* 11) Change the "type" for "opacheader" from "textarea" to "htmlarea" 12) Reload the "OPAC" tab in Global System Preferences 13) Note that there is a WYSIWYG editor instead of a textarea for "opacheader" 14) Try different ways of changing the field's contents (e.g. typing with the keyboard, pasting content using the browser's paste option [note that browser security will probably prevent you using the context menu paste option], dragging text into the WYSIWYG editor box, etc.)** 15) Note that the preference says "opacheader (modified)" and the "Save all OPAC preferences" button has been enabled. 16) Click the save button and reload the page 17) Note that the content is there exactly as you entered it! 18) Try editing it again only using editor buttons (e.g. "bold", "link", etc) and note that the preference says "opacheader (modified)" and the save button has been enabled. 19) Look on the actual OPAC to see how your content has been rendered!*** *I opted not to edit any *.pref files with this commit as I think that's a separate step to actually adding the "ability" to use the WYSIWYG **If you're using anything except IE, this should work super well. If you're using IE, it'll probably only work for keyboard input and dragging text within the editor box but not from outside of it. IE has worse security, so you can probably paste using the context menu paste. ***While I think a WYSIWYG editor can be useful, there might be times where the content is displayed differently than it is in the editor because of higher level CSS and Javascript. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
