From 449b81a93eff2b640ee057ad49c4d3ddc792969b Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 22 Apr 2022 15:46:32 +0300 Subject: [PATCH] COMPATIBILITY: new editor helper fn signatures See https://github.com/discourse/discourse/commit/94207e27d16f120fe8ce01e9542ded41118bccbc --- .../wizard/initializers/custom-wizard-field.js.es6 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 b/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 index f5deb927..e397af5f 100644 --- a/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 +++ b/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 @@ -114,13 +114,13 @@ export default { _wizardInsertText(args = {}) { if (args.fieldId === this.fieldId) { - this._insertText(args.text, args.options); + this.insertText(args.text, args.options); } }, _wizardReplaceText(args = {}) { if (args.fieldId === this.fieldId) { - this._replaceText(args.oldVal, args.newVal, (args.opts = {})); + this.replaceText(args.oldVal, args.newVal, (args.opts = {})); } }, @@ -139,7 +139,7 @@ export default { let html = clipboard.getData("text/html"); let handled = false; - const { pre, lineVal } = this._getSelected(null, { lineVal: true }); + const { pre, lineVal } = this.getSelected(null, { lineVal: true }); const isInlinePasting = pre.match(/[^\n]$/); const isCodeBlock = isInside(pre, /(^|\n)```/g); @@ -150,7 +150,7 @@ export default { !isCodeBlock ) { plainText = plainText.trim().replace(/\r/g, ""); - const table = this._extractTable(plainText); + const table = this.extractTable(plainText); if (table) { this.appEvents.trigger("wizard-editor:insert-text", { fieldId: this.fieldId,