0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-21 17:00:29 +01:00

COMPATIBILITY: Convert actions in wizard composer editor

Dieser Commit ist enthalten in:
Angus McLeod 2024-10-09 10:15:13 +02:00
Ursprung c1db1442b7
Commit b78f3aad09
2 geänderte Dateien mit 73 neuen und 69 gelöschten Zeilen

Datei anzeigen

@ -14,6 +14,7 @@ import { uploadIcon } from "discourse/lib/uploads";
import { dasherize } from "@ember/string";
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
import { inject as service } from "@ember/service";
import { action } from "@ember/object";
const IMAGE_MARKDOWN_REGEX =
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
@ -119,7 +120,7 @@ export default ComposerEditor.extend({
);
},
actions: {
@action
extraButtons(toolbar) {
const component = this;
@ -135,6 +136,7 @@ export default ComposerEditor.extend({
toolbar.addButton({
id: "link",
icon: "link",
group: "insertions",
shortcut: "K",
trimLeading: true,
@ -168,6 +170,7 @@ export default ComposerEditor.extend({
}
},
@action
previewUpdated(preview) {
highlightSyntax(preview, this.siteSettings, this.session);
@ -180,6 +183,7 @@ export default ComposerEditor.extend({
this._super(...arguments);
},
@action
showLinkModal(toolbarEvent) {
let linkText = "";
this._lastSel = toolbarEvent.selected;
@ -192,9 +196,9 @@ export default ComposerEditor.extend({
});
},
@action
showUploadModal() {
this.session.set("wizardEventFieldId", this.field.id);
document.getElementById(this.fileUploadElementId).click();
},
},
});

Datei anzeigen

@ -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.8.6
# version: 2.8.7
# 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