Jump to content

New module: Hanna Code Dialog for TinyMCE


BitPoet
 Share

Recommended Posts

Hey there, born out of a personal need I've implement a lightweight version of @Robin S' Hanna Code Dialog module for TinyMCE. In a bout of creativity, I've named it

HannaCodeDialogTiny

This module is still in alpha state and needs some extensive testing.

If you encounter any problems, please open an issue on GitHub.

It has no select options, descriptions or cheat sheets (yet), and it doesn't cope well with nested Hanna Codes.

What it does have is the Insert Hanna Code dropdown in the TinyMCE menu bar with dialog-based insertion, non-editable Hanna Codes in the editor, double click on existing codes for editing in a dialog. Hanna Codes are also highlighted, and you can drag and drop them around.

The dropdown:

hcdt_dropdown.thumb.png.dcc8145f5ca0180eecec65b57b8c05ab.png

Double click on any highlighted Hanna Code:

hcdt_before.thumb.png.652e24549024ba5aa74cf7a826574513.png

Fill in your values:

hcdt_edit.thumb.png.230556faa5c2a956eae265c54487476c.png

The Hanna Code has been changed:

hcdt_after.thumb.png.2845968224165f53179d339a5c9cfce7.png

Have fun!

  • Like 17
  • Thanks 2
Link to comment
Share on other sites

Awesome, thanks for creating this @BitPoet!

I am going to be locked into CKEditor for the foreseeable future because in addition to my public modules I have a number of private modules that integrate with CKEditor and rebuilding them all for TinyMCE will be a big job. And for the types of sites I work on I don't see many advantages of TinyMCE over CKEditor so I don't have much motivation to do all the rebuilding at the moment - I'll probably get to it eventually but not any time soon.

So it's great that HannaCodeDialogTiny is available for anyone who wants to switch to TinyMCE sooner than I do.

  • Like 10
Link to comment
Share on other sites

  • 2 months later...

There seems to be an error for me on the latest ProcessWire:

Fatal Error: Uncaught Error: Class "TextformatterHannaCode" not found in site/modules/HannaCodeDialogTiny/HannaCodeDialogTiny.module:84

There was an upgrade to TinyMCE in this version so I am not sure if that has anything to do with it. I have selected 'hannadialog' and 'hannadropdown' in the 'External plugins to enable' section of the field.

Link to comment
Share on other sites

OK I looked at that line and it is to do with the default open tag, the next line is to do with the close tag. I went into the module settings for TextformatterHannaCode and clicked 'Submit' without making any changes and now everything works.

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...