PluginProbe
wpForo Forum / 1.4.11
wpForo Forum v1.4.11
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / wpf-assets / js / tinymce-pre.js

tinymce-pre.js in wpForo Forum 1.4.11, at wpf-assets/js/tinymce-pre.js

30 lines 958 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function() {
2
3 tinymce.create('tinymce.plugins.wpforo_pre_button', {
4 /**
5 * Initializes the plugin, this will be executed after the plugin has been created.
6 * This call is done before the editor instance has finished it's initialization so use the onInit event
7 * of the editor instance to intercept that event.
8 *
9 * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
10 * @param {string} url Absolute URL to where the plugin is located.
11 */
12 init : function(ed, url) {
13 ed.addCommand('preFormat', function() {
14 ed.formatter.toggle('pre');
15 });
16
17 ed.addButton('pre', {
18 title : 'Code',
19 cmd : 'preFormat',
20 icon: 'code'
21 });
22
23 ed.addShortcut('ctrl+0','pre','preFormat')
24 },
25 });
26
27 // Register plugin
28 tinymce.PluginManager.add('wpforo_pre_button', tinymce.plugins.wpforo_pre_button);
29
30 })();