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 5560a126..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,15 @@ 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, showLink: false, @@ -197,10 +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 }, }); }, diff --git a/plugin.rb b/plugin.rb index 913bee25..c5681fb6 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.4.16 +# version: 2.4.17 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech