Jump to content
teppo

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/
 
post-175-0-27266600-1381985925_thumb.png

  • Like 23

Share this post


Link to post
Share on other sites

Awesome idea teppo - thanks - I look forward to testing it out!

  • Like 1

Share this post


Link to post
Share on other sites

This is great, thanks Teppo! This is something I have wanted but just didn't know how to do. I will definitely be using this. 

  • Like 3

Share this post


Link to post
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

EDIT:

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

TinyMCE support is planned, but not available yet.
Edited by Macrura

Share this post


Link to post
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 :)

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Ooh, just tried installing this on 2.5 and am getting not all dependencies met

What am I missing?

Share this post


Link to post
Share on other sites

Ooh, just tried installing this on 2.5 and am getting not all dependencies met

What am I missing?

Having forgotten all about writing that, I just tried to install it again.

Same result, sadly... :(

Share this post


Link to post
Share on other sites

Having forgotten all about writing that, I just tried to install it again.

Same result, sadly... :(

Is your text editor setup to accept Hanna Code?

Share this post


Link to post
Share on other sites

Ok, Im going to try it but I'm running 2.5.9 or something on the bleeding edge. 

Edited by Peter Knight

Share this post


Link to post
Share on other sites

oh

Unless this is a conflict somewhere and not to do with the PW version.

Share this post


Link to post
Share on other sites

I have hanna code installed and working fine - this is an existing project.

Share this post


Link to post
Share on other sites

I also have Hanna code installed and is working fine - this is an existing project.

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
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. 

https://github.com/teppokoivula/HannaCodeHelper/blob/master/HannaCodeHelper.module#L35

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

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...