Skip to content

Commit

Permalink
custom TinyMCE button JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Bulatov committed Feb 26, 2016
1 parent 30a4bdc commit 74af739
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions wp-content/themes/mag-wp/custom/andres-tinymce-buttons.js
@@ -0,0 +1,20 @@
(function() {
tinymce.PluginManager.add('andres_interview_buttons', function( editor, url ) {
editor.addButton( 'andres_interview_question', {
title: 'Interview Queston',
// icon: 'icon fa fa-question',
text: 'IQ',
onclick: function() {
editor.selection.setContent('<h6 class="post-question">' + editor.selection.getContent() + '</h6>');
}
});
editor.addButton( 'andres_interview_answer', {
title: 'Interview Answer',
// icon: 'icon fa fa-comment-o',
text: 'IA',
onclick: function() {
editor.selection.setContent('<h6 class="post-answer">' + editor.selection.getContent() + '</h6>');
}
});
});
})();

0 comments on commit 74af739

Please sign in to comment.