Skip to content

sitepoint/Editize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Editize

A WYSYIWYG HTML editor Java applet originally developed by SitePoint Pty Ltd and sold commercially via editize.com. Now released open source and free.

Editize was created and developed by Kevin Yank for SitePoint Pty Ltd.

Project Status

Editize is unsupported software, released as-is for the benefit of the community and Editize customers, who can now use it in new projects without buying additional licenses. SitePoint does not provide support of any kind for the open source version of Editize.

If you do need help with Editize, try emailing Kevin Yank. He might be able to help out in his spare time.

Why (or Why Not) Editize?

Editize was a product of its time. First released on May 17th, 2002 (after its former life as Octopus, a WYSIWYG editor for the proprietary markup format used by the content management system of sitepoint.com), it was developed as a Java applet because the JavaScript capabilities of the web browsers of the time (which still included Netscape Navigator 4 and Internet Explorer 4) were not yet sophisticated enough to support WYSIWYG editing of HTML content.

It would be fair to say that the Web has moved on from Java applets like Editize. These days, all modern browsers support the contenteditable attribute, which provides browser-native in-place editing of an HTML element’s content. Popular free JavaScript libraries like TinyMCE build on this feature to provide a richly customizable editing experience far beyond what Editize was designed to offer.

Still, Java lives on even if the Web has left it behind. Java applets still offer capabilities that JavaScript does not (rich system clipboard support, for example), and Java itself still enjoys some limited popularity as a platform for building cross-platform desktop applications. As such, the technology within Editize may yet be of some use, which is why SitePoint is releasing its source code.

Goodies in the Code

For Java developers who may peruse this codebase, here are a few things to look out for:

  • src/com/editize/editorkit/ParagraphView.java – An implementation of left/right floated images (not supported by Java Swing’s standard HTML editor kit).
  • src/com/editize/HTMLPane.java – Handling of HTML clipboard data from the system clipboard in Mac OS X and Windows, including some smarts around detecting when pasted content should be treated as inline or block-level content, as well as some scrubbing of the horrible HTML code generated by Microsoft Word.
  • src/com/editize/EditizeApplet.java – A per-domain applet licensing system based on sound cryptographic principles, including support for time-limited trials and a blanket license covering use on private networks. This code was removed in commit 17a402eda3e9a3be778ea42669ae8123a1078004 for the free version, but can still be viewed in the code history. Contact Kevin Yank if you’d like the source code to the license key generation tool as well!
  • Basic support for WYSIWYG editing of HTML tables, including Insert/Delete Table Row/Column actions.

How to Use Editize

The files you would normally get as a user of Editize (as opposed to a developer) can be found in the dist/ subdirectory of this distribution, or may be downloaded as a ZIP file from the Downloads tab of this project on GitHub. It contains the open source release of Editize along with all support files and documentation.

The Editize user manual can be found in dist/manual/index.html. It provides full instructions for integrating Editize into a web page to provide WYSIWYG editing of HTML content.

Building Editize Yourself

Assuming your system has an up-to-date Java 2 SE SDK and the Ant build system installed, you have everything you need to build Editize yourself. Just navigate into the directory containing the files in this repository and type ant. Once the build is complete, you will have fresh copies of editize.jar and kunststoff.jar in the current directory.

Signing Editize for Local Clipboard Access

When released commercially, the Editize applet was signed with a trusted code signing certificate that granted the applet permission to access the system clipboard. Unfortunately, it was not possible to sign this free release of the applet in the same way.

If you wish to sign Editize (or any modified derivative) yourself to regain access to the system clipboard, here’s what you need to do:

  1. Purchase a Java Code Signing Certificate for your organization. SitePoint obtained its certificate from Thawte, which as of this writing charges US$299 per year for a code signing certificate. You need to renew the certificate when it expires and re-sign the applet to continue using it as a signed applet.
  2. Generate a new key using the keytool provided with the Java SDK: 1. Type this command at your system prompt: keytool -genkey -keyalg RSA -alias myeditizekey 2. Answer the questions about you and your organization. Your certificate provider can provide guidance for how to answer these, but in general you will want to supply your website domain (e.g. editize.com) as the “first and last name” when prompted.
  3. Generate a Certificate Signing Request (CSR) to send to you certificate provider: 1. Type this command at your system prompt: keytool -certreq -alias myeditizekey -file myeditizekey.csr 2. Open the resulting .csr file in a text editor to copy and paste it into the web form provided by your certificate provider.
  4. Once you certificate provider supplies you with a signed certificate, download it in the default PKCS #7 Certificate Chain format: 1. You’ll see the certificate as a block of text in the browser. Select it (including the BEGIN and END lines) and copy and paste it into a text editor. 2. Save it as a .crt file (e.g. myeditizekey.crt).
  5. Import the certificate 1. Type this command at your system prompt: keytool -import -trustcacerts -alias myeditizekey -file myeditizekey.crt 2. Observe the confirmation: “Certificate reply was installed in keystore”
  6. Update build.xml to use your key to sign the editize.jar file after it is built. Look for the jarsign.module.editize target in the build.xml file and follow the instructions in the comment there.
  7. Build Editize as normal to get a signed version of editize.jar.

Work Needed

Although the original creator of Editize, Kevin Yank, cannot commit the time to address these lingering issues with the Editize code, he’d be happy to hear from and provide some advice to anyone who wanted to tackle any of the items below.

Outstanding Feature Requests

  • Microsoft Word change-tracking code (<span class="msoIns/msoDel">) should be filtered out of clipboard content when pasting.
  • ASP.NET Web Forms control should be a strongly-named assembly.
  • Need to document the undocumented “XHTML strict mode” feature and add WYSIWYG support for the element classes it applies.
  • OpenOffice HTML clipboard compatibility.
  • More intelligent special character encoding, with character set awareness (currently entity-encodes all non-ASCII characters).
  • ASP.NET Web Forms control should support using Editize within the edit item template of an ASP.NET DataGrid.
  • ASP.NET Web Forms control should support data binding.
  • Add image list refresh button.
  • Add end-user help/documentation (and/or Help button with configurable URL).
  • Creation/editing of table cell row/colspans.
  • Indent/outdent actions should affect list nesting.
  • Support for drag and drop of text/images into Editize.
  • Improvements to the Image List feature.
  • Integrated image upload.
  • Find & Replace support.
  • Insert Symbol feature.
  • Justified alignment (not natively supported by Java - see Java forum thread)
  • Clicking an image should select it (incl. floating images).
  • Inserting multiple spaces should be allowed by generating nonbreaking spaces (optional?).
  • Enable creating hr elements (partially implemented, but there’s a problem with inserting text before/after it).
  • Pop editor out into its own window.
  • Make hyperlink dialog more helpful and beginner friendly.
  • Replace current API-based configuration with a configuration file.

Outstanding Bugs

This list of known bugs has been collected from support requests over the years. These bugs may or may not exist in the current version of the code:

  • Reports of a hang on inserting a hyperlink in Mac OS X (not reproducible?)
  • Reports of a redraw bug related to tabbed browsing in Safari
  • When deleting the last column of a table, the rows are joined together.
  • Generated JavaScript should be escaped with a CDATA block for XHTML compatibility.
  • Select All is broken when the document starts with a table.
  • Making changes to the document in Code View leaves an empty table at the end of the document when the pre-edit document starts with a table.
  • Copying a block from and pasting into a table cell breaks the table structure.
  • Significant whitespace is stripped from the ends of clipboard contents when pasting.
  • Applet unneccessarily steals keyboard focus at startup.
  • Converting a pre element to a paragraph or other block type should normalize space in the affected block(s).
  • Empty paragraphs should be output as <p>&nbsp;</p> to prevent collapse.
  • Clipboard operations within lists break the list structure.
  • Pasted content should be subject to configured formatting restrictions.

Archaic APIs

The JavaScript code used in (and generated by) the ASP, ASP.NET, JavaScript, and PHP APIs is archaic to say the least. It relies on the outdated document.write DOM feature, it doesn’t gracefully degrade to a standard textarea when either Java or JavaScript is unavailable, and it works around many quirks of ancient browsers that are no longer an issue today.

In general, the four Editize APIs should be scrapped and replaced with a nice, simple JavaScript API developed according to modern best practices including progressive enhancement.

About

A WYSIWYG HTML editor Java applet originally developed by SitePoint Pty Ltd and sold commercially via editize.com. Now released open source and free.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published