diff 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
line wrap: on
line diff
--- a/src/plugins/format.js	Thu Aug 11 00:04:48 2022 -0600
+++ b/src/plugins/format.js	Thu Aug 11 19:54:03 2022 -0600
@@ -14,7 +14,7 @@
 	'use strict';
 
 	sceditor.plugins.format = function () {
-		var base = this;
+		var base = {};
 
 		/**
 		 * Default tags
@@ -41,8 +41,8 @@
 			formatCmd;
 
 
-		base.init = function () {
-			var	opts  = this.opts,
+		base.init = function (editor) {
+			var	opts  = editor.opts,
 				pOpts = opts.paragraphformat;
 
 			// Don't enable if the BBCode plugin is enabled.
@@ -62,8 +62,8 @@
 				}
 			}
 
-			if (!this.commands.format) {
-				this.commands.format = {
+			if (!editor.commands.format) {
+				editor.commands.format = {
 					exec: formatCmd,
 					txtExec: formatCmd,
 					tooltip: 'Format Paragraph'
@@ -122,5 +122,7 @@
 
 			editor.createDropDown(caller, 'format', content);
 		};
+
+		return base;
 	};
 })(sceditor);