0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 02:50:28 +01:00

Ensure our custom paste logic is running

Dieser Commit ist enthalten in:
angusmcleod 2021-06-16 13:55:10 +10:00
Ursprung 58b3bc13c9
Commit f742626786
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -4,6 +4,10 @@ export default Ember.Application.extend({
rootElement: "#custom-wizard-main", rootElement: "#custom-wizard-main",
Resolver: buildResolver("wizard"), Resolver: buildResolver("wizard"),
customEvents: {
paste: "paste"
},
start() { start() {
Object.keys(requirejs._eak_seen).forEach((key) => { Object.keys(requirejs._eak_seen).forEach((key) => {
if (/\/pre\-initializers\//.test(key)) { if (/\/pre\-initializers\//.test(key)) {

Datei anzeigen

@ -15,7 +15,7 @@ export default {
); );
const DEditor = requirejs("discourse/components/d-editor").default; const DEditor = requirejs("discourse/components/d-editor").default;
const { clipboardHelpers } = requirejs("discourse/lib/utilities"); const { clipboardHelpers } = requirejs("discourse/lib/utilities");
const { toMarkdown } = requirejs("discourse/lib/to-markdown"); const toMarkdown = requirejs("discourse/lib/to-markdown").default;
FieldComponent.reopen({ FieldComponent.reopen({
classNameBindings: ["field.id"], classNameBindings: ["field.id"],
@ -181,7 +181,7 @@ export default {
markdown = pre.match(/\S$/) ? ` ${markdown}` : markdown; markdown = pre.match(/\S$/) ? ` ${markdown}` : markdown;
} }
this.appEvents.trigger("composer:insert-text", { this.appEvents.trigger("wizard-editor:insert-text", {
fieldId: this.fieldId, fieldId: this.fieldId,
text: markdown, text: markdown,
}); });