========================== Ekit README ========================== Ekit v0.9g (C)2000-2003 Howard Kistler/hexidec codex App/Applet for editing and saving HTML in a Java text component. ABOUT -------------------------- Ekit is a program & applet that uses the Java 2 libraries to create an HTML editor. The Ekit standalone also allows for HTML to be loaded and saved, as well as serialized and saved as an RTF. It is currently an advanced beta, and most features work fine. Updates to this and other hexidec codex projects can be found here: http://www.hexidec.com/ Please feel free to share any enhancements or bug reports with me at: hexidec@telepath.com ABOUT LICENSE -------------------------- Ekit was originally distributed under the GPL license. However, it was brought to my attention that the GPL license is not suited for programs that link to non-GPL libraries, such as Ekit does by linking to the Sun Swing library. Hence, I have changed the licensing on Ekit to the LGPL, which is more appropriate. This should not impact any Ekit users adversely, as anyone who was using it before under the GPL can still do so without any conflicts under the LGPL. In addition, this opens up Ekit for use with more projects which might contain some proprietary libraries of their own as well. It is my intention through this change to make Ekit conform better to open source licensing and to make Ekit more available and accessible to developers and users, and I think by switching to the LGPL all of these criteria are thus met. I am aware that releasing a product under the GPL is supposed to be an "irreversible" process. However, as this product was in violation of the stricter terms of the GPL, this reassignment to LGPL is not a change so much as a correction of licensing. REQUIREMENTS -------------------------- Ekit requires the following software: - Java 2 (Sun JDK 1.3 or later, or compatible variant) - Swing Library (standard with Java 2) EkitApplet requires the following software: - Browser with Java Plug-in 1.3 or later Sun JDK Standard Edition Homepage : http://java.sun.com/j2se/ Sun JDK 1.3 available here : http://java.sun.com/j2se/1.3/ Sun JDK 1.4 available here : http://java.sun.com/j2se/1.4/ FILES -------------------------- These are the base class source files: EkitCore.java - Source for the core Ekit functionality Ekit.java - Source for Ekit application shell EkitApplet.java - Source for EkitApplet shell EkitCore is replaced by one of these two core files during compilation: EkitCore_Basic.java - The standard Ekit core. EkitCore_Spell.java - The core plus supports for the Jazzy spellchecker. The "action" subdirectory contains these action class sources: CustomAction.java - Special situation actions (like anchor insertion) FormatAction.java - General text format actions (like subscript) ListAutomationAction.java - Bulleted/Numbered List creation actions StylesAction.java - CSS Style actions The "component" subdirectory contains these component class sources: ExtendedHTMLDocument.java - HTMLDocument with custom functionality ExtendedHTMLEditorKit.java - HTMLEditorKit with custom functionality FileDialog.java - Dialog for loading files from server FontSelectorDialog.java - Dialog for applying system fonts to text HTMLUtilities.java - Special utility functions ImageDialog - Dialog for loading images from server ImageFileChooser.java - Image selector dialog ImageFileChooserPreview.java - Image preview rendering panel JButtonNoFocus.java - JButton that does not obtain focus JComboBoxNoFocus.java - JComboBox that does not obtain focus JToggleButtonNoFocus.java - JToggleButton that does not obtain focus MutableFilter.java - Filetype dialog filter PropertiesDialog.java - Generic parameter request dialog RelativeImageView.java - HTML Image rendering component SearchDialog.java - Find/Replace dialog SimpleInfoDialog.java - Basic message dialog TableInputDialog.java - Table specification input dialog UserInputAnchorDialog.java - Custom anchor input dialog UserInputDialog.java - Custom data input dialog There is also a copy of the TaggingDriverServlet.java source within the "materials" folder. You may use this on your server for server-based file and image loading. The "icons" subdirectory contains these custom icons for the ToolBar: AnchorHK.gif - "Make Anchor" ToolBar Icon BoldHK.gif - "Bold Text" ToolBar Icon ClearFormatHK.gif - "Clear Format Action" ToolBar Icon CopyHK.gif - "Copy Action" ToolBar Icon CutHK.gif - "Cut Action" ToolBar Icon ItalicHK.gif - "Italicise Text" ToolBar Icon NewHK.gif - "New Document" ToolBar Icon OListHK.gif - "Ordered List" ToolBar Icon OpenHK.gif - "Open Document" ToolBar Icon PasteHK.gif - "Paste Action" ToolBar Icon SaveHK.gif - "Save Document" ToolBar Icon SourceHK.gif - "View Source" ToolBar Icon StrikeHK.gif - "Strike Text" ToolBar Icon SubHK.gif - "Subscript Text" ToolBar Icon SuperHK.gif - "Superscript Text" ToolBar Icon UListHK.gif - "Unordered List" ToolBar Icon UnderlineHK.gif - "Underline Text" ToolBar Icon The "HK" suffix merely designates that they are my designs. You can replace these images with your own icons if you wish. The "com/hexidec/util" directory contains these standard hexidec codex tools: Base64Codec.java - Base64 encoding/decoding class Translatrix.java - Translation resource handler class These are the ancillary files that are included with the standard Ekit source distribution: ekit.manifest - Jar manifest file for ekit.jar MakeEkit.csh - Script to (re)build the ekit.jar file (Unix/MacOSX) MakeEkitApplet.csh - Script to (re)build the ekitapplet.jar file (Unix/MacOSX) MakeEkit.bat - Batch file to (re)build the ekit.jar file (Windows) MakeEkitApplet.bat - Batch file to (re)build the ekitapplet.jar file (Windows) MakeEkit.ant - XML file to (re)build the ekit.jar file using Ant MakeEkitApplet.ant - XML file to (re)build the ekitapplet.jar file using Ant ekit.css - Default CSS Stylesheet for Ekit documents EkitAppletDemo.html - Example web page for displaying Ekit applet RunEkit.csh - Script for launching Ekit (Unix/MacOSX) RunEkit.bat - Batch file for launching Ekit (Windows) README - This document materials/LGPL - Copy of the Lesser GNU Public License The distribution also contains these pre-compiled Ekit JARs: Basic Version ekit.jar ekitapplet.jar Spellcheck Version ekitspell.jar ekitappletspell.jar NOTE : If you want to use the spellcheck versions, move or delete the basic versions and rename the spellcheck versions to the basic names. So, for example, ekitspell.jar should be renamed ekit.jar. JAZZY SOURCES -------------------------- Ekit optionally incorporates a modified subset of the Jazzy open source spellchecker. The root folder of the Jazzy classes is "com/swabunga/spell". You will find the following subdirectories and sources there. (See the README file under the "swabunga" directory for more information.) The "engine" subdirectory contains the basic mechanics of the spellchecker. Configuration.java DoubleMeta.java EditDistance.java GenericTransformator.java PropertyConfiguration.java SpellDictionary.java Transformator.java Word.java configuration.properties The "dictionary" subdirectory beneath "engine" houses the available dictionary files. Currently there is only an English dictionary included. english - English dictionary file The "event" sudirectory contains the various event classes and functional methods for the spellchecker. BasicSpellCheckEvent.java DocumentWordTokenizer.java SpellCheckEvent.java SpellCheckListener.java SpellChecker.java StringWordTokenizer.java WordTokenizer.java The "swing" subdirectory contains the GUI components and message lists. JSpellDialog.java JSpellForm.java messages.properties messages_sv.properties COMPILATION (OPTIONAL) -------------------------- If you modify the included .java files, or need to recreate the .class files, use the following commands within the "source" directory to build them. All commands assume you are at the top of the source tree (the directory containing the "com" directory). All commands listed are one-line commands as well, though some are broken to multiple lines in this file due to length. Also note that the backslash ("\") character should be replaced by the appropriate path separator for your operating system if it is different. Unix or Mac OS X users may run the MakeEkit.csh and MakeEkitApplet.csh scripts from a terminal window. Remember to preface them with "./" when running from within the code directory. Windows users may double-click the MakeEkit.bat and MakeEkitApplet.bat batch files, or execute them from the command line. Both sets of batch files take an optional command line argument. You can enter "basic" after the batch file to compile the standard Ekit classes, or enter "spell" after the batch file to build in the Jazzy spellchecker classes. For example, here is a standard build of EkitApplet on Unix: MakeEkitApplet.csh or MakeEkitApplet.csh basic Here is an example of building Ekit with spellchecking on Windows: MakeEkit.bat spell Apache Ant (http://jakarta.apache.org/ant/) users may use the included .ant XML files to compile and build the Ekit jar files with Ant. You may manually compile Ekit with the following command: Unix/MacOSX javac com/hexidec/ekit/Ekit.java Windows javac com\hexidec\ekit\Ekit.java Apache Ant ant -buildfile MakeEkit.ant You may manually compile EkitApplet with the following command: Unix/MacOSX javac com/hexidec/ekit/EkitApplet.java Windows javac com\hexidec\ekit\EkitApplet.java Apache Ant ant -buildfile MakeEkitApplet.ant Ekit takes no special arguments during compile. The above command assumes your Java development environment is configured according to minimal standards and can locate the relevant Java core files properly. View the .csh or .bat files for the proper syntax to manually create the jar files under your OS. EXECUTION (APP) -------------------------- All users with properly configured systems will be able to launch Ekit by double-clicking on the "ekit.jar" file. Unix/MacOSX users may lanuch Ekit with the "RunEkit.csh" script. Windows users may launch Ekit by double-clicking the batch file "RunEkit.bat". You may manually execute Ekit from the command line with the following command from within the directory containing the ekit.jar file: java -jar ekit.jar com.hexidec.ekit.Ekit [-t/T] [-s/S] [-m/M] [-x/X] [-d/D] [-fHTMLfile] [-cCSSfile] [-rRawHTML] [-lLangcode] Note that your CLASSPATH settings should include the "current directory" specifier "." for this to work. The [optional] command line arguments are: -t/-T : Show/Hide the ToolBar (Show by default) -s/-S : Show/Hide the Source window (Hide by default) -m/-M : Show/Omit Menu icons (Show by default) -x/-X : Exclusive Edit Mode On/Off (On by default) -b/-B : Document is/isn't Base64 encoded (Isn't by default) -d/-D : Show/Hide the Debug menu (Hide by default) -f : Load the HTML document specified by HTMLfile -c : Load the CSS stylesheet specified by CSSfile -r : Load the raw HTML string specified by RawHTML -l : Start Ekit in the language specified by Langcode* [* Langcode is a combination of the 2-letter language and country codes, in the format "xx_XX", where xx is the language code and XX is the country code. For example, the Langcode for English/United States is "en_US", English/United Kingdom is "en_UK", and German/Germany is "de_DE". Note that there must be a matching "LanguageResources_xx_XX.properties" file in the com/hexidec/ekit directory for the language you want to use. Missing language files, and existing language files that may be missing words in use, will take words from the "LanguageResources.properties" file, which contains default words in "en_US" encoding marked with a trailing asterisk.] So, for example, to start Ekit with the ToolBar hidden, the Source window showing, and pre-load it with the "Home.html" document and "Styles.css" stylesheet, you would enter: java -jar ekit.jar com.hexidec.ekit.Ekit -T -s -fHome.html -cStyles.css To start Ekit with a short example HTML document written as a raw string, you could enter: java -jar ekit.jar com.hexidec.ekit.Ekit -r"This is a test " To start Ekit with the Italian/Italy language file: java -jar ekit.jar com.hexidec.ekit.Ekit -lit_IT Note that you shouldn't have to specify the language setting if you want Ekit to run in your native language, provided there is an appropriate language file in the com/hexidec/ekit directory and your Java environment is configured to use your language by default. EXECUTION (APPLET) -------------------------- Embed the Ekit applet in a web page and view in an appropriate browser. The jar file should be included in the directory with the web page and it should also be "visible" to the web server. The included "EkitAppletDemo.html" page contains the code necessary to view the applet properly. You may use this as the basis for including Ekit in your own web pages. COMMAND SUMMARY -------------------------- File Menu New Document - Create new document (clear current one if exists). Open Document - Load an HTML document into the editor. Open Stylesheet - Load CSS stylesheet and apply it to the current document. Open Base64 Document - Load a Base64 encoded document into the editor. Save - Save the current document (prompts for filename if new document). Save As - Save the document with the name specified in the file chooser. Save Body - Save the document after deleting the HEAD element. Save RTF - Save the document in Rich Text Format (RTF). Save Base64 - Save the document in Base64 encoding. Serialize - Save the document in the default Java serialization form. Read From Ser - Load a serialized document into the editor. Exit - Close the app (you will lose any unsaved work). Edit Menu Cut - Remove the selected text and place it in the clipboard. Copy - Place a copy of the selected text in the clipboard. Paste - Place the contents of clipboard into the document at the current cursor position. Undo - Undo the previous action (some may not be undoable). Redo - Redo the last undone action (some may not be redoable). Select All - Select all the text in the editor. Select Paragraph - Select the paragraph at the current cursor postion. Select Line - Select the line at the current cursor postion. Select Word - Select the word at the current cursor postion. View Menu Toolbar - Toggles display of the ToolBar. Source - Toggles display of the Source window, where the HTML can be observed and directly manipulated. Font Menu Bold - Bold the selected text. Italic - Italicise the selected text. Underline - Underline the selected text. Strike-through - Strike through the selected text. Big - Increase the font size of the selected text. Small - Decrease the font size of the selected text. Superscript - Change the selected text to superscripted text. Subscript - Change the selected text to subscripted text. Monospaced - Render the select text in the Monospaced font. Sans-serif - Render the select text in the Sans-serif font. Serif - Render the select text in the Serif font. Color Submenu Aqua - Color the selected text aqua. Black - Color the selected text black. Blue - Color the selected text blue. Fuschia - Color the selected text fuschia. Gray - Color the selected text gray. Green - Color the selected text green. Lime - Color the selected text lime. Maroon - Color the selected text maroon. Navy - Color the selected text navy. Olive - Color the selected text olive. Purple - Color the selected text purple. Red - Color the selected text red. Silver - Color the selected text silver. Teal - Color the selected text teal. White - Color the selected text white. Yellow - Color the selected text yellow. Format Menu Align Submenu Align Left - Left align the selected text (may include unselected text that is part of the element) Align Center - Center align the selected text (same proviso as Left) Align Right - Right align the selected text (same proviso as Left) Align Justified - Justify the selected text (same proviso as Left) Heading Submenu Heading 1 - Render the selected text in the HTML

style. Heading 2 - Render the selected text in the HTML

style. Heading 3 - Render the selected text in the HTML

style. Heading 4 - Render the selected text in the HTML

style. Heading 5 - Render the selected text in the HTML

style. Heading 6 - Render the selected text in the HTML
style. Unordered List - Convert the selected text to an unordered (bulleted) list. New list items are created at each paragraph mark in the text. Ordered List - Convert the selected text to an ordered (numeric) list. New list items are created at each paragraph mark in the text. List Item - Convert the selected text to a list item (will create an enclosing unordered list if not part of a defined list). Blockquote - Place the selected text inside BLOCKQUOTE tags. Pre - Place the selected text inside PRE (preformat) tags. Span - Place the selected text inside SPAN tags. Clear Format - Remove markup from elements. Insert Menu Anchor - Convert the selected text to a hyperlink after specifying the URL in the pop-up dialog Break - Insert an HTML break
element Nonbreaking Space - Inst an HTML non-breaking space ( ) metacharacter Horizontal Rule - Insert an HTML horizontal rule
element Insert Local Image - Insert an image from file chooser pop-up Insert Image From Server - Insert an image from server (requires server image app to be runnning) Table Menu Table - Insert a table based on settings in pop-up Insert Row - Insert a row in the current table Insert Column - Insert a column in the current table Delete Row - Delete a row in the current table Delete Column - Delete a column in the current table Forms Menu Insert Form - Add the surrounding FORM tags for an HTML form Text Field - Insert an HTML Text Field Text Area - Insert an HTML Text Area Checkbox - Insert an HTML Checkbox Text Field - Insert an HTML Radio Button Button - Insert an HTML Button (NON-RENDERING!) Submit Button - Insert an HTML Submit Button Resest Button - Insert an HTML Reset Button Help Menu About - Displays the Ekit About information dialog Debug Menu Describe Doc - Describe the document nodes to the console window Describe CSS - Describe the stylesheet properties to the console window What Tags? - List the node tags applied to the element under the cursor VERSION HISTORY -------------------------- 0.1 (08/08/2000) - initial creation 0.2 (08/24/2000) - added tag attribute management - added anchors - cleaned up menu actions 0.3 (08/30/2000) - added appName & currentFile - added Save menu item - added updateTitle method - changed to only empty constructor - added refreshOnUpdate() optional refresh code 0.4 (08/31/2000) - added table insertion (experimental) - added image insertion (experimental) 0.45 (09/05/2000) - added list formatting - added break insertion - added horizontal rule insertion - added purgeUndos() convenience method for resetting the UndoManager - changed "load" commands to "open" commands (more in line with current application conventions) - merged some menus so that they no longer build an explicit JMenuItem (sacrifices some readability for object allocation improvements) 0.5 (09/18/2000) - added CSS support - moved calls to JFileChooser to a reusable method - moved "debug" types of functions to their own menu - renamed the "Styles" menu "Format", so as not to be confused with StyleSheet Styles 0.6 (09/29/2000) - added optional ToolBar - added table row, table cell, and table-within-table insertion - vastly improved break & horizontal rule insertion - allow pre-loading of HTML document and CSS stylesheet from command line - centralized exception handling - fixed getFileFromChooser method to correctly display OPEN/SAVE dialogs - now exists as a JAR file 0.7 (11/03/2000) - added Source window for viewing/editing HTML tags - added Shift-Return insertion of BR tags 0.8 (05/05/2001) - added JButtonNoFocus inner class to keep toolbar buttons from taking focus from editor canvas - added JToggleButtonNoFocus inner class for toolbar elements that indicate toggle-state features (such as View Source) 0.9 (01/06/2002) - added mnemonics for menu items (this also removed need for KeyListener) - added View menu - added Help menu - added table settings dialog - added Internationalization capabilities - added language files for Italian, German, Spanish, Portuguese, and Slovenian - fixed lack of repaint after cancelling "Open Stylesheet" - Debug menu now optional, defaults to OFF - moved View Source and Edit Mode to new View menu 0.9a (02/02/2002) - added image rendering & image selector - image types supported : JPEG, GIF, & PNG - added fix for dealing with HTML character encoding issue 0.9b (03/08/2002) - added CSS style selector - added more standard HTML tags : STRONG, EM, BLOCKQUOTE, PRE, and TT 0.9c (03/23/2002) - added Search menu and Find/Replace functions - added auto-bulleted lists - added warning dialog for actions that fail - split-pane divider now remembers its position - changed and consolidated some menus - altered "Save Body" method to work more as expected 0.9d (09/24/2002) - added language files for French and Norwegian - broke out inner classes to separate component classes - added EkitCallback class to allow easier access by shared components - much improved Anchor handling and formatting - changes to get app to work on JDK 1.4 0.9e (10/26/2002) - Ekit split into core (EkitCore) and shell (Ekit, EkitApplet) classes - added language files for Finnish and Dutch - added support for HTML forms and form elements - added tag support - font familes and
insertion now through inherent editor actions - "Insert Table Row" now inserts the correct number of cells - added generic PropertiesDialog - SimpleInfoDialog auto-centers and allows different dialog types - added calls to build semi-custom menus and toolbars - removed EkitCallback (obsolesced by EkitCore) - Change of license to LGPL (see ABOUT LICENSE section) 0.9f (11/25/2002) - optional integration of Jazzy spellchecker - addition of font selector - greater menu customization 0.9g (5/5/2003) - can load and save documents in Base64 encoded format - bulleted lists now create new entries upon hitting ENTER - added color picker to font selector - support for access to the System Clipboard - support for loading images from server via servlet - added dispose() method to core - added more insert and delete options for tables - tables now have their own menu and better functionality - fixed problem with IMG tag SRC URLs containing spaces - fixed the getDocumentBody error where the contents did not reflect the current document - fixed the known memory/resource leaks caused by the SpellChecker - added language files for Spanish (Mexican), Hungarian and Chinese NOTE: The following items work in Ekit but not yet in EkitApplet, due to the applet security model: - Insert Image (Images referenced via a URL should work, though) - Copy & Paste from system clipboard - Access of local files We are looking into ways to make these features available. The probable solution will be to obtain a security certificate. CONTRIBUTORS -------------------------- Thanks to the many people who have downloaded and used Ekit, as well as providing valuable feedback. The following people have made additional contributions to Ekit. (List in is chronological order of contribution.) Yaodong Liu (yaodongliu@yahoo.com) - CSS Support Code - HTML Insertion Support Code Gyoergy Magoss (GYOERGY.MAGOSS@bhf-bank.com) - Table Support Code Oliver Moser (omoser@dkf.de) - HTML Insertion Support Code Michael Goldberg (MGoldberg@yet2.com) - README Support Cecile Rostaing (cecile.rostaing@free.fr) - Feature Suggestions Thomas Gauweiler (gauweiler@fzi.de) - EkitAppletDemo2.html & ShowAppletOutput.php demo files Frits Jalvingh (jal@grimor.com) - Correct image rendering and character encoding support - CSS Styles Selector - Original ExtendedHTMLEditorKit & RelativeImageView classes - Original ImageFileChooser & ImageFileChooserPreview classes Ruud Noordermeer (ruud.noordermeer@back2front.nl) - Fix for split-pane rendering issue in EkitApplet Mindaugas Idzelis (aim4min@users.sourceforge.net) - Provided the excellent Jazzy spellchecker Raymond Penners (dotsphinx@users.sourceforge.net) - Fix for IMG tag SRC URLs containing spaces Steve Birmingham (steve.birmingham@c3bgroup.com) - Server image support classes and methods - Color picker code in font dialog - Numerous bug fixes, including the dispose() for the SpellChecker Rafael Cieplinski (cieplinski@web.de) - Better auto-bulleting function - Improved table handling - Original HTMLUtilities class Nico Mack (nico.mack@mmp.lu) - System clipboard access code - Other bug fixes TRANSLATIONS -------------------------- Thanks also to the people who volunteered to translate Ekit into their languages. The following people have made translations available. (List in is chronological order of contribution. Any current errors in the language files are most likely do to my own attempts to add new terms to them, and I appreciate receiving any corrections.) Nick Schwendener (nschwendener@vtxnet.ch) - Italian LanguageResources_it_CH.properties LanguageResources_it_IT.properties Gyoergy Magoss (GYOERGY.MAGOSS@bhf-bank.com) - German LanguageResources_de_DE.properties Jesus Escanero (jescanero@yahoo.es) - Spanish LanguageResources_es_ES.properties Fernando Luiz (responsavel2@hotmail.com) - Portuguese LanguageResources_pt_BR.properties LanguageResources_pt_PT.properties Jernej Vicic (jernej@activetools.si) - Slovenian LanguageResources_sl_SI.properties Gerald Estadieu (gerald.estadieu@cem-macau.com) - French LanguageResources_fr_FR.properties Anders Bjorvand (anders@kommunion.no) - Norwegian LanguageResources_no_NO.properties Vesa Kotilainen (vesa.kotilainen@sonera.com) - Finnish LanguageResources_fi_FI.properties Mark de Haan (mark@starwave.nl) - Dutch LanguageResources_nl_NL.properties Samuel Dmaz - Spanish (Mexican) LanguageResources_es_MX.properties Tamás Érdfalvi (devnull@eagent.hu) - Hungarian LanguageResources_hu_HU.properties Yang Yu (yangyu@users.sourceforge.net) - Chinese LanguageResources_zh_CN.properties