You are here

TinyMCE Extension for Alfresco

Rich Hart's picture
Rich Hart

A recent customer requirement was identified in the Document Management side of Alfresco (as opposed to the WCM side). The requirement I refer to; was to embed content from the DM repository directly into new content being created via the WYSIWYG editor.

After thinking about it for a little, I went about producing a solution that was based on the WCM version. The majority of the work is done in the backing bean object for the editor; this is where the folder structure browse and select content functionality becomes available, as well as the ability to upload new content into the repository.

The TinyMCE editor for DM has to be initialised slightly differently, so that the file browser call back is invoked. This allows the browse button to be loaded.

I replicated and extended the WCM functionality to allow the following:

  • Browse folders and content from the DM content repository (cm:folder & cm:content types) as standard.
  • Return selectable content (when browsing folder structure) for types based on configurable mime types e.g. display all content with mime type of image/*
  • Configurable content type browse to allow for custom types to be browsed e.g. display all content for cm:content and/or cm:customContent types.
  • Only browse content to embed from the context that the editor has been opened in (and any subfolder(s) of the current context).
  • Allow a shared context (for example a shared image repository) so that a user can add content from this location (and any subfolder(s) content) as well.
  • Allow new content to be uploaded from the file system into the current context.




The upshot of this; was that the client was happy with the solution and I was happy to be of service!

Add new comment