| 12 | (function() { |
| 13 | |
| 14 | var factory = function (exports) { |
| 15 | |
| 16 | var $ = jQuery; // if using module loader(Require.js/Sea.js). |
| 17 | |
| 18 | exports.testPlugin = function(){ |
| 19 | alert("testPlugin"); |
| 20 | }; |
| 21 | |
| 22 | exports.fn.testPluginMethodA = function() { |
| 23 | /* |
| 24 | var _this = this; // this == the current instance object of Editor.md |
| 25 | var lang = _this.lang; |
| 26 | var settings = _this.settings; |
| 27 | var editor = this.editor; |
| 28 | var cursor = cm.getCursor(); |
| 29 | var selection = cm.getSelection(); |
| 30 | var classPrefix = this.classPrefix; |
| 31 | |
| 32 | cm.focus(); |
| 33 | */ |
| 34 | //.... |
| 35 | |
| 36 | alert("testPluginMethodA"); |
| 37 | }; |
| 38 | |
| 39 | }; |
| 40 | |
| 41 | // CommonJS/Node.js |
| 42 | if (typeof require === "function" && typeof exports === "object" && typeof module === "object") |