RTE Plugin for Coranto by Thomas Weber (Jahandar) Hello, I've been working on this off and on for my own use, so it was originally pretty specific just to my needs (For the curious you can see my first frustrations that led me to begin this addon at http://coranto.gweilo.org/forum/viewtopic.php?t=7685&highlight=). I've been working to make it more generic, and have completed enough that I can share what I have so far. The htmlArea program that WebWriter is based on is not as stable as I would like on all browsers and can be difficult to modify, among other things. This addon uses a modified version of Kevin Roth's Rich Text Editor (which is how the addon got its name), but does much more than just rich text, its a full HTML editor. I've found RTE to be quite stable on all browsers, plus it is very easy edit, and it is public domain software that is actively maintained on Kevin Roth's forum. The ease of editing is key, I think, because it means more improvements and options, and tailoring the editor for use with Coranto. The changes I've made to the standard RTE include: Improved Image Insertion Dialog Designed with the categories addon and multipart addon (with NetPBM) in mind, this addon employs a perl fetcher program to find images for each category. From the dialog window, you can chose the category you want to see the images available for that category. Then you have several options. Display as thumbnail, Link to Fullsize, Create a caption below the image, etc. Insert Custom Snippet Dialog If you have a lot of prefab snippets of code that you use over an again, you'll love this. A perl fetcher finds your snippets and makes them available in a select box. Just choose the one you want and insert it into your post. To see a live working demo of the RTE editor, go to http://www.sunsetphoto.com/content/includes/rte/demo.htm Note that this is beta, and the setup procedure is a tad rough at the moment, especially since it was originally designed for me and my websites and the way I have things set up may differ from the way you do. There is no Coranto-Style documentation or settings interface yet. Further development will largely depend on how much interest there is in this addon. SETTINGS This version doesn't have a friendly settings interface yet, so you'll have to do things the old fashioned way. Sorry, I know its a pain. Check for variables at the beginning of the three cra_* files. If your path to coranto is not /cgi-bin/coranto then modify following SSI calls: Line #67 inside rte/insert_Snippet.shtml Line #183 inside rte/insert_Image.shtml INSTALLATION Coranto cgi-bin folder (wherever you normally put addons, eg /cgi-bin/coranto): cra_RTE.pl cra_RTE_buildImageSelector.cgi chmod to 755 cra_RTE_buildSnippetSelector.cgi chmod to 755 Includes folder (usually /content/includes) rte folder Wherever popup.js SETUP • Enable the addon via the Coranto admin interface • If you plan to use the 'Link to Larger Version' feature when adding images, make sure the popup.js file (or just the function inside it) is made available on your news pages. The easiest way is to have in your page header • Create snippets by placing each snippet in a separate file (txt, html, shtml, htm) inside the snippets folder you specified. The filename will be used as the snippet's name in the select box. Known Issues: • In IE only, If you add an image then select it then click the add link button, you'll get a javascript error. (RTE problem) Planned/Possible Improvements: • All - Documentation (via Coranto) • All - Settings interface (via Coranto) • All - Better integration with Coranto (retrieving vars, auto-detecting categories, etc.) • RTE - Use Coranto's CSS • RTE - Fullscreen toggle • RTE - Support for alternative spellcheckers • RTE - Better support for alternative spellcheckers and a html2xhtml script that is free for commercial use • RTE Image Inserter - support for alternative thumbnail naming schemes and alternative popup scripts • RTE Image Inserter - toggle for display of thumbnails in the list; possibly button to toggle this as a filter in the insert image dialog window • RTE Image Inserter - textarea showing code to be generated for advanced editing • RTE Image Inserter - Set height and width attributes; perhaps generate pseudo-thumbnails by this method • RTE Image Inserter - Support for any other attributes I missed.. border, style, id • RTE Image Inserter - Set default values for all form elements • RTE Image Inserter - option to disable image selector for those who don't want/need it, for a speed gain • RTE - Buttons to expedite working in HTML mode (auto-insert tags, etc) • RTE - New Dialog: Insert custom code snippets. Choose a custom code snippet from a list and have it inserted. Example: Logo, Contact Information, etc. • cra_RTE - Give the option to use RTE for creating/editing styles • cra_RTE - Adaptability to work with other versions of RTE readily • All - Code Hooks (under consideration.. would forever separate this plugin's version of RTE from any other, making the adaptability idea above impossible) • RTE - compress richtext.js NOTE: The html2xhtml.js is included but untested and currently disabled. It is developed by someone else altogether and free for noncommercial use. See html2xhtml.js for more info. NOTE: Be careful with the Search and Replace tool, as it replaces markup as well as normal content Test Server: I did my testing on a linux server with Perl, SSI, and the following Coranto plugins installed: Maginot, Multipart, News Categories, X MultiSubmit, Modify News: Include Field, Modify News: User Column Download from http://www.sunsetphotography.com/cra_RTE_v0.5b.zip I would greatly appreciate any feedback, suggestions, bug reports, fixes, improvements, etc. Please post them or any questions you have to this thread.