HannaCodeDialogTiny by BitPoet

Enhances the use of Hanna tags in TinyMCE fields, including the dialog-based editing of Hanna tags.


A module for ProcessWire CMS/CMF. Provides a number of enhancements for working with Hanna Code tags in TinyMCE. The main enhancement is that Hanna tags in a TinyMCE field may be double-clicked to edit their attributes in a modal dialog.

Requires the Hanna Code module, InputfieldTinyMCE and ProcessWire >= v3.0.218.


Alpha, please do not use this in production yet


Install the HannaCodeDialogTiny module using any of the normal methods.

For any TinyMCE field where you want the "Insert Hanna tag" dropdown menu to appear in the TinyMCE toolbar, visit the field settings and add "hannadropdown" to the "TinyMCE Toolbar" settings field.

Module configuration

Visit the module configuration screen to set any of the following:

  • Exclude prefix: Hanna tags named with this prefix will not appear in the TinyMCE toolbar dropdown menu for Hanna tag insertion.
  • Exclude Hanna tags: Hanna tags selected here will not appear in the TinyMCE toolbar dropdown menu for Hanna tag insertion.


Insert tag from toolbar dropdown menu

Place the cursor in the TinyMCE window where you want to insert your Hanna tag, then select the tag from the "Insert Hanna tag" dropdown.

Advanced: if you want to control which tags appear in the dropdown on particular pages or templates you can hook HannaCodeDialogTiny::getDropdownTags.

Edit tag attributes in modal dialog

Insert a tag using the dropdown or double-click an existing tag in the TinyMCE window to edit the tag attributes in a modal dialog.

Tags are noneditables

Hanna tags that have been inserted in a TinyMCE window are "noneditables" - they have a background colour for easy identification, are protected from accidental editing, and can be moved within the text by drag-and-drop.


HannaCodeDialogTiny was inspired by HannaCodeDialog, a Hanna Code helper module for InputfieldCKEditor. Big thanks to Robin S! A lot of the PHP code was taken and adapted from that module. Some features (select options in Hanna dialogs or dynamic options) have not been implemented here.


Released under Mozilla Public License v2. See file LICENSE for details.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #499
    In the 499th issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, introduce a new third party module called RockPdf, and more. Read on!
    Weekly.pw / 3 December 2023
  • Using date range fields in ProcessWire
    This week we'll take a detailed look at the newest addition to the ProFields set of modules: the Date Range Fieldtype and Inputfield.
    Blog / 24 November 2023
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull