excellent, thanks for the fast reply!
By any chance do you have a tinymce snippet for adding similar shortcode? The one on github is minified.
for those interested, this works for me (I disable your quicktags option entirely):
// domready wrapper
jQuery(function(jq){
// start position
var position = 200;
var languages = {
'php' : 'PHP',
'html' : 'HTML',
'css' : 'CSS',
'js':'JS'
}
// iterate over all available languages
jq.each(languages, function(slug, name){
// increment position
position++;
QTags.addButton('enlighter-' + slug, name, '[' + slug + ']', '[/' + slug + ']', null, name, position);
});
});
if you want to limit the language list globally (all editors) you can just use one of the filters
OK, I see I explained myself really badly 🙂 Maybe I’m missing a setting.
I’m using bbpress with a compact tinymce editor, it’s not showing anything on there, it
shows the text editor quicktags, but nothing in the HTML editor
But yes, also if the result is what I see in the editor, if there’s a filter that’d also be handy in hand with adding it to the front-end editor.
I had seen the filters, but not that first link. Thanks!
I assume then there’s no (documented) way to add the HTML buttons to the minimal editor then, right?
I’d rather keep the minimal editor if the trade-off is no source code options. I can add instructions for the 4 shortcodes people can use.
there are a lot of tutorials regarding TinMCE4 out there…but the question is what do you want to achieve ? The official Enlighter TinyMCE plugin creates an insert+edit dialog button. see https://github.com/EnlighterJS/documentation/blob/master/editing/TinyMCE.md
The Enlighter TinyMCE Editor Pluin can also be added to any customized TinyMCE instance, but you have to enqueue the resources manually.