Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Merge pull request #260 from paviliondev/fix-hyperlink-modal-deprecation
COMPATIBILITY: Update insert-hyperlink invocation following core change
Dieser Commit ist enthalten in:
Commit
b45e01803d
2 geänderte Dateien mit 7 neuen und 6 gelöschten Zeilen
|
@ -12,12 +12,15 @@ import { alias } from "@ember/object/computed";
|
||||||
import Site from "discourse/models/site";
|
import Site from "discourse/models/site";
|
||||||
import { uploadIcon } from "discourse/lib/uploads";
|
import { uploadIcon } from "discourse/lib/uploads";
|
||||||
import { dasherize } from "@ember/string";
|
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 =
|
const IMAGE_MARKDOWN_REGEX =
|
||||||
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
||||||
|
|
||||||
export default ComposerEditor.extend({
|
export default ComposerEditor.extend({
|
||||||
|
modal: service(),
|
||||||
|
|
||||||
classNameBindings: ["fieldClass"],
|
classNameBindings: ["fieldClass"],
|
||||||
allowUpload: true,
|
allowUpload: true,
|
||||||
showLink: false,
|
showLink: false,
|
||||||
|
@ -197,10 +200,8 @@ export default ComposerEditor.extend({
|
||||||
if (this._lastSel) {
|
if (this._lastSel) {
|
||||||
linkText = this._lastSel.value;
|
linkText = this._lastSel.value;
|
||||||
}
|
}
|
||||||
|
this.modal.show(InsertHyperlink, {
|
||||||
showModal("insert-hyperlink").setProperties({
|
model: { linkText, toolbarEvent },
|
||||||
linkText,
|
|
||||||
toolbarEvent,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
# name: discourse-custom-wizard
|
# name: discourse-custom-wizard
|
||||||
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
# 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
|
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
|
||||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||||
# contact_emails: development@pavilion.tech
|
# contact_emails: development@pavilion.tech
|
||||||
|
|
Laden …
In neuem Issue referenzieren