Generic Editor Adaptor plugin for Coranto by Thomas Weber (Jahandar) Description This addon allows you to setup Coranto to work with most HTML editors, including RTE, Spaw, FCKeditor, htmlArea, etc. Configuration Read the documentation for the editor you wish to install. Most will have a line to go in the header and some code to go in the body. Get that information, then head to the GEA section of the Coranto configuration page. Paste the header and body text into the fields where indicated. You'll notice a few other options are available, those are prefab options that I threw in and that are commonly used by editors. If you set one, you can use the value in your code body just as you do Coranto fields. Just add the text [GEA: FieldName] and the information will be added for you. You can add additional fields and options, but at this point the only way to do this is to add a new line in the cra_GEA.pl file, but it isn't difficult. In the file you'll see an area labelled Editor Settings, just add a new line at the bottom in the following format: $GEA_editorSettings{'SettingName'} = ['Setting Title', qq~Setting Description~,'custom html']; At this point, addon developers will notice that this is the same syntax as $addon->addAdvancedSetting and question the redundancy. I did it this way with future developments in mind. Anyway, now you'll be able to configure your new setting on the configuration page and call it using [GIA: XXX]. If you're lazy, or don't plan on changing much, you don't even have to worry about the [GIA: Tags], just toss the code in and you'll be set. The only tag you HAVE to use is the [GIA: Content] tag, which tells GIA where to put the content of a page when you're modifying posts. One thing to watch out for, though, is many times in the documentation they don't tell you right away what you need to load content into the editor. This is important because you'll need it in order to modify posts, so make sure you get that information and include it in the inline code. For instance, for FCKeditor, the line is: oFCKeditor.Value = "[GEA: Content]"; and you make sure to insert it right above the Create(); line. Also, be sure to disable Convert Newlines for the news Text Field. Field Tags The following fields/settings are included automatically, you can always add more to suit your needs (see above). Remember, you can insert the value of these using [GIA: XXXX] FieldName, Path, XHTML, Width, Height, ShowButtons, ReadOnly, FullScreen, NoNewLines, CSSFile, CFGFile, HeaderHTML, InlineHTML Expansion and Hooks If you need more functionality, or if you just want to expand the possible uses for any editor in Coranto (for instance, using your editor to edit styles), you will be pleased to know that this addon was designed to be expansion-friendly and an ideal platform for future development. I've added hooks liberally, commented my code so you can tell what is happening, and wrote my code to be readable. You can create addons that expand GIA, without having to modify GEA itself. The Future and License Some possible expansions for GEA. - Editor Profiles, to switch between editor setups on the fly, or have different profiles for different editor uses (for instance, separate profiles for submitting and modifying posts) - Use editor elsewhere in Coranto.. (editing styles, for instance) - Parse editor config files, allow modification of editor CFG files through Coranto If anyone wants to implement one of these expansions or some other, feel free. Because you can make GEA expansions as separate addons, you won't need permission to modify my code. For this reason I am not making cra_GIA.pl open source. I want to ensure future developments of GEA itself are made with maximum flexibility and in mind. However, I am open to modification if it can be justified that it is better than expansion through a new addon with GIA as a platform. An expansion could be added to the core GIA (or at least distributed with GIA) if it is suitable, the author of that expansion and I can work that out. About Author: Thomas Weber (Jahandar) www.Antarat.net This addon is based on my cra_RTE addon, which does essentially the same thing, but your only choice of editor is RTE. Note: While I tried to make this as generic as possible, and it should work for most editors (every one that I've ever looked at will work), if you happen to find an incompatibility with a certain editor, report it and I'll see what I can do. Please report any bugs, suggestions, improvements, and such on the Coranto forum.