4.4.1. Content Handlers
Docmenta allows to install applications for viewing and editing of content-nodes. By default, the TinyMCE editor is installed for editing of XHTML content-nodes. However, other editors can be provided through plug-ins. This chapter describes how to create such an editor or viewer plug-in.
In the Docmenta Plug-In API, applications that can be used for editing or viewing content nodes are called "content handlers". On start-up of the web-server, Docmenta registers all installed content handlers that are located in the "apps" folder within the Docmenta web-application directory. When a user edits or views a content node, one of the content handlers that is registered for the node's file extension can be selected by the user. A content handler can support the viewing or the editing of content, or both.
In the following section a plug-in is created that supports the viewing of text files, but no editing. Afterwards, the plug-in is extended to also allow editing of text files.