========================== Ekit README ========================== Ekit v0.9h (C)2000-2004 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 probably 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 EkitCoreSpell.java - Source for extended core with spell checking Ekit.java - Source for Ekit application shell EkitApplet.java - Source for EkitApplet shell 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 SymbolDialog.java - Special symbol character 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" directory. 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 directory 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