Jump to content

Hanna Code Helper


Recommended Posts

This tiny module is intended as a helper for Ryan's Hanna Code module by providing a way to select existing Hanna Code tags within the editor. This is something I felt our clients needed in order to start properly using Hanna Code tags. See attached screenshot for details -- there's really not that much to it at the moment.
Each editor requires it's own plugin and currently I've only cooked one up for CKEditor, where the plugin presents itself as a context menu item (visible on right click). I'm planning to expand the feature set of that one slightly and then probably convert the CKEditor plugin to TinyMCE, but that's just about it. Ideas are welcome, though.
Some of the code is pretty much duplicated from Ryan's original module. I hope he doesn't mind -- though for the record I've also tried to make it very clear in the source what part that is and where it's from.. :)
GitHub: https://github.com/teppokoivula/HannaCodeHelper

Modules directory: http://modules.processwire.com/modules/hanna-code-helper/

  • Like 23
Link to comment
Share on other sites

This is great, my only issue is that i'm having trouble with CKEditor in general, with it loading up blank, and it's been hard to track down the issue - so switched back to tinyMCE, and am thinking about how i could adapt this module to be used with that, might be cool to have a button on the toolbar with 'HC' or something which would bring up the list of hanna codes


just read the readme.md...   looking forward!

TinyMCE support is planned, but not available yet.
Edited by Macrura
Link to comment
Share on other sites

@Macrura: I'm planning to port this for TinyMCE at some point, though personally I no longer use TinyMCE anywhere, so this hasn't really been too high on my todo list :)

CKEditor loading blank sounds like an issue with ACF so I'd try disabling it and see if it helps; usually you can find your way around it's quirks, but having had more than my share of trouble with it I'm no longer sure if it's actually worth it.

That's a typical issue for something like not having "div" in available format tags list while having div tags in your content. Note: having these tags in extraAllowedContent doesn't seem to make any difference at all.

.. and, honestly speaking, CKEditor is awful when it comes to error messages and exception handling. Usually it just disables all or some features seemingly without any logical reason. Just guessing, but they probably thought that showing nothing would be better than showing incomprehensible technical error messages -- or something like that :)

Link to comment
Share on other sites

Great teppo, thanks. I have not used CKEditor yet, but gonna try it out soon, looks prettier. I remember fiddling around with custom text injection with TinyMCE a couple of years back. What I used was just a simple select box and the selected text was injected at the current cursor position, so no extra modal was necessary. Is it not possible with CK without the extra step?

Link to comment
Share on other sites

  • 9 months later...

It is great! I want to propose an enhancement though. Do not know if it could be easily done, because I did not try Hanna codes yet (but definately will do in the future).

Those tags look really scary for the user. It would be great to be able to name those codes, so they will show without the square brackets in the list. But this is probably unwise to do in this modulу, but rather in the Hanna code module itself.

Anyway, this is surely usefull as it is. Thanks, Teppo!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Okay, well there must be a conflict going on somewhere. Hanna version? Mine is 1.9

What else could it be conflicting with? 

The Download and install page says:

Class HannaCodeHelper Version 0.5.0

Installed? Not yet 

Release State Beta Compatibility 2.3, 2.4

Requires 0.0.0 >= 0 

Link to comment
Share on other sites

Hanna 1.9

Hann Helper 0.5.0 

Where you'r seeing this and how do you download install it? I used built in module download via link

Requirements are here and are fullfilled if you have Hanna Code installed. 


Does it say what requirements aren't meat?

I'd guess you try to intall through ClassName and PW checks to see the PW version which it doesn't meet, although the module doesn't have this requirement.

http://modules.processwire.com/modules/hanna-code-helper/ 2.3 2.4

Link to comment
Share on other sites

I am installing through classname

The error at the top of the page just says:  Module is not installable because not all required dependencies are currently met.

Under requires it says: 0.0.0 >= 0 - with a downward thumb icon next to it.

And that is all it says. 

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...