From 6454d5fd9b056bde0998abd456204e5a9258cd8e Mon Sep 17 00:00:00 2001 From: merefield Date: Thu, 1 Feb 2024 10:56:19 +0000 Subject: [PATCH] sync file with main --- .../components/custom-wizard-composer-editor.js.es6 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 b/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 index e52f2382..95ae56c0 100644 --- a/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 @@ -12,12 +12,14 @@ import { alias } from "@ember/object/computed"; import Site from "discourse/models/site"; import { uploadIcon } from "discourse/lib/uploads"; import { dasherize } from "@ember/string"; -import showModal from "discourse/lib/show-modal"; +import InsertHyperlink from "discourse/components/modal/insert-hyperlink"; +import { inject as service } from "@ember/service"; const IMAGE_MARKDOWN_REGEX = /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g; export default ComposerEditor.extend({ + modal: service(), classNameBindings: ["fieldClass"], allowUpload: true, @@ -198,9 +200,8 @@ export default ComposerEditor.extend({ if (this._lastSel) { linkText = this._lastSel.value; } - showModal("insert-hyperlink").setProperties({ - linkText, - toolbarEvent, + this.modal.show(InsertHyperlink, { + model: { linkText, toolbarEvent }, }); },