opubWriter new features
Today I implemented the following changes to opubWriter:
- Pass multiple CSS stylesheets to TinyMCE initialisation. Now that the ‘Style Usage’ form is available, the user can assign more than one stylesheet to a content document. The TinyMCE editor has the ability to work with multiple stylesheets; what was needed to TinyMCE to apply a document’s stylesheets was to find all the ‘text/css’ link elements in the selected document and set the content_css property of TinyMCE during initialisation to a comma-separated list of absolute URLs to these stylesheets.
- Disallow stylesheet deletion if it’s in use. On the Styles form the user has the ability to upload, modify, and delete stylesheets. An epub would fail validation if a referenced item were not in the manifest. When a user selects a stylesheet for deletion, a check is now made across all content documents (media-type = ‘application/xhtml+xml’) in the manifest for a element that refers to the selected stylesheet. If any reference is found, a message is displayed and the stylesheet is not deleted.
- New Epub form now has a dropdown list of languages. When a user creates a new epub book using the New button on the Library form, a screen is displayed which captures some intial metadata. One of the mandatory items captured is the language code identifying the language in which the intellectual content is written. The code must conform to RFC 3066. In order to save the user the effort of looking up the code for their selected language, the New Epub form now offers a dropdown list of language names, defaulted to English, and the list delivers the language code for the selected language to the application.
- More validation. Characters that are not allowed in filenames and XML documents are detected when the user types into the Contents Entry field when adding a content document to a publication. A suitable error message is displayed. On the New Epub form, the user must provide a title and an identifier which are mandatory metadata items in epub.
opubWriter User Guide
I have started a User Guide for opubWriter which is available as Pages within this blog. The articles to date (shown to the right of this screen) are:
- Register and Login
- Managing Your Library
- Editing Epub Contents
Articles in the pipeline are:
- Managing Metadata
- Managing Styles
- Document Organisation