Skip to content

Commit

Permalink
COMPATIBILITY: new editor helper fn signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Apr 22, 2022
1 parent 0b6ba86 commit 449b81a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}));
}
},

Expand All @@ -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);

Expand All @@ -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,
Expand Down

0 comments on commit 449b81a

Please sign in to comment.