I am batteling an issue here.
I am setting up AnsPress on a development site, before moving it to my live site to replace Sabai Discuss plugin.
My site has issues with the Crayon plugin, so I can’t use this on my site but have found the Mivhak syntax highlighter plugin
This plugin is faster and works perfect, when the content is created in the admin. The extension to TinyMCE is only loaded in the admin.
But it has a very nice feature, which highlights all content encapsulated in <code> or <pre> tags, so if I only was able to have a simple button on the TinyMCE editor which would wrap selection in <code> I would be happy.
Unfortnuatly this is only available in the Text (html) editor in wordpress, and I need it in the visual editor.
I have written a few TinyMCE plugins to insert this <code> tag, but when these plugins are loaded, then hitting the “Post Question / Answer” button, does not save the contents of the editor.
I am stuck right now. I have been working on this for days now.
I really need a simple button which will wrap the selected text in <code></code> tags or <pre></pre> tags, in the TinyMCE editor in the AnsPress plugin.
Can you please help me with this?
My site is in Danish, so I have downloaded the language file from the wordpress site and I have completed the translation from 17% translated to 100% translated.
The WordPress online translation tools sucks, so can I send you this language file by mail?
I really only need this <code> feature in order for exchanging the sabai discuss and set AnsPress live on my site, so I hope to hear from you. You should really give Mivhak a try instead of crayon. It is so much better.
Please try answer suggested here: http://wordpress.stackexchange.com/questions/144705/unable-to-add-code-button-to-tinymce-toolbar
It does work for me, always.
If above solution does not work then there there must be an error. Please check console for error or share your site link so that we can see.
Also, all translation must be done on WordPress translation site. Their tool feels complicated in first view but its very simple. Let me know if I can do anything to help you with understanding translation tool.