gutenberg_blocks.js
7 years ago
mce-button.js
7 years ago
tutor-admin.js
7 years ago
tutor-front.js
7 years ago
mce-button.js
36 lines
| 1 | jQuery(document).ready(function($){ |
| 2 | 'use strict'; |
| 3 | |
| 4 | /*======================================================================== |
| 5 | * Tutor WP Editor Button |
| 6 | *======================================================================== */ |
| 7 | |
| 8 | tinymce.PluginManager.add('tutor_button', function( editor, url ) { |
| 9 | editor.addButton( 'tutor_button', { |
| 10 | text: 'Tutor ShortCode', |
| 11 | icon: false, |
| 12 | type: 'menubutton', |
| 13 | menu: [ |
| 14 | { |
| 15 | text: 'Student Registration Form', |
| 16 | onclick: function() { |
| 17 | editor.insertContent('[tutor_student_registration_form]'); |
| 18 | } |
| 19 | }, |
| 20 | { |
| 21 | text: 'Student Dashboard', |
| 22 | onclick: function() { |
| 23 | editor.insertContent('[tutor_student_dashboard]'); |
| 24 | } |
| 25 | },{ |
| 26 | text: 'Instructor Registration Form', |
| 27 | onclick: function() { |
| 28 | editor.insertContent('[tutor_instructor_registration_form]'); |
| 29 | } |
| 30 | }, |
| 31 | ] |
| 32 | }); |
| 33 | }); |
| 34 | |
| 35 | }); |
| 36 |