April 18, 2011

New TinyMCE link-tool for internal linking for Produce & Publish

During the refactoring and reimplementation of the Produce & Publish Authoring Environment we came across the fact that the current options for creating links to other content pages inside Plone are pretty poor. Content authors often need to reference to images, headings or tables across content-pages. References are need in order to generate references inside a PDF document like "See image #" or "See table #...on page ..."

One part of the solution is to create a stable internal IDs for all linkable parts of a page. While saving a Plone content page we will insert IDs for tables, images and headings (h2...h5 elements) if not present so far. In order to simplify and unify the handling of links to other content pieces we create a new TinyMCE pluging - the Produce & Publish link tool. The usage is similar to the standard PloneLink tool: you highlight a piece of content that should be linked and click on the Linktool icon from the TinyMCE toolbar.

The link-tool will show linkable pieces of contents of the current content project within the Authoring Environment grouped by structure, images and tables.

The structure view shows all content pages of the current projects and their structure (h2...h5 tags). Clicking on a structure element will insert a link to this page element.


Images are display in the same way: for each content page you will see a list of images (thumbnail size)


Links to tables can be inserted through the table view. To identify tables we use the table's caption or summary.


The look & feel is still pretty basic but the functionality is there and the overall outcome for a half-day of work is a major win.