comparison src/plugins/format.js @ 29:ea32a44b5a6e

remove more oo
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 11 Aug 2022 19:54:03 -0600
parents a199722647d0
children
comparison
equal deleted inserted replaced
28:f227fdfebded 29:ea32a44b5a6e
12 */ 12 */
13 (function (sceditor) { 13 (function (sceditor) {
14 'use strict'; 14 'use strict';
15 15
16 sceditor.plugins.format = function () { 16 sceditor.plugins.format = function () {
17 var base = this; 17 var base = {};
18 18
19 /** 19 /**
20 * Default tags 20 * Default tags
21 * @type {Object} 21 * @type {Object}
22 * @private 22 * @private
39 */ 39 */
40 var insertTag, 40 var insertTag,
41 formatCmd; 41 formatCmd;
42 42
43 43
44 base.init = function () { 44 base.init = function (editor) {
45 var opts = this.opts, 45 var opts = editor.opts,
46 pOpts = opts.paragraphformat; 46 pOpts = opts.paragraphformat;
47 47
48 // Don't enable if the BBCode plugin is enabled. 48 // Don't enable if the BBCode plugin is enabled.
49 if (opts.format && opts.format === 'bbcode') { 49 if (opts.format && opts.format === 'bbcode') {
50 return; 50 return;
60 delete tags[val]; 60 delete tags[val];
61 }); 61 });
62 } 62 }
63 } 63 }
64 64
65 if (!this.commands.format) { 65 if (!editor.commands.format) {
66 this.commands.format = { 66 editor.commands.format = {
67 exec: formatCmd, 67 exec: formatCmd,
68 txtExec: formatCmd, 68 txtExec: formatCmd,
69 tooltip: 'Format Paragraph' 69 tooltip: 'Format Paragraph'
70 }; 70 };
71 } 71 }
120 content.appendChild(link); 120 content.appendChild(link);
121 }); 121 });
122 122
123 editor.createDropDown(caller, 'format', content); 123 editor.createDropDown(caller, 'format', content);
124 }; 124 };
125
126 return base;
125 }; 127 };
126 })(sceditor); 128 })(sceditor);