Skip to content

Commit 449b81a

Browse files
committed
COMPATIBILITY: new editor helper fn signatures
See discourse/discourse@94207e2
1 parent 0b6ba86 commit 449b81a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assets/javascripts/wizard/initializers/custom-wizard-field.js.es6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ export default {
114114

115115
_wizardInsertText(args = {}) {
116116
if (args.fieldId === this.fieldId) {
117-
this._insertText(args.text, args.options);
117+
this.insertText(args.text, args.options);
118118
}
119119
},
120120

121121
_wizardReplaceText(args = {}) {
122122
if (args.fieldId === this.fieldId) {
123-
this._replaceText(args.oldVal, args.newVal, (args.opts = {}));
123+
this.replaceText(args.oldVal, args.newVal, (args.opts = {}));
124124
}
125125
},
126126

@@ -139,7 +139,7 @@ export default {
139139
let html = clipboard.getData("text/html");
140140
let handled = false;
141141

142-
const { pre, lineVal } = this._getSelected(null, { lineVal: true });
142+
const { pre, lineVal } = this.getSelected(null, { lineVal: true });
143143
const isInlinePasting = pre.match(/[^\n]$/);
144144
const isCodeBlock = isInside(pre, /(^|\n)```/g);
145145

@@ -150,7 +150,7 @@ export default {
150150
!isCodeBlock
151151
) {
152152
plainText = plainText.trim().replace(/\r/g, "");
153-
const table = this._extractTable(plainText);
153+
const table = this.extractTable(plainText);
154154
if (table) {
155155
this.appEvents.trigger("wizard-editor:insert-text", {
156156
fieldId: this.fieldId,

0 commit comments

Comments
 (0)