RichGuk/syntaxhl — pull request #7 by elemental-shift (2012-08-09 14:42:19+00:00)
Title: Context Menu support for edit snippet and create new snippet

Changes
-------------
+ Added support for tinyMCE context menu plugin if user has it installed enabled
+ Add context menu option to edit existing snippet it the user right clicks inside of it.
+ Dialog window is populated with snippet content and all options are set according to the snippet parameters. On save the snippet is replaced with edited content and settings.
+ Added context menu option to create new snippet when user clicks on non syntaxHL element.
+ New Snippet option appears only if the user does not click on existing snippet, otherwise they are presented with the edit option.

Tested in Chrome 21, Firefox 14, Safari 5, and IE8
+ IE8 has a bug with the context menu, but this is not limited to this plugin, it's the context menu plugin itself that fails to function.
+ Window sizing for the dialog does not work correctly in Chrome 21, but again this is a tinyMCE issue as it happens with the html edit dialog as well.

Working exmple can be found here: http://elemental-shift.beta.koding.com/projects/syntaxhl-demo/index.php