Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +01:00
Merge pull request #120 from paviliondev/fix-paste-event
Ensure our custom paste logic is running
Dieser Commit ist enthalten in:
Commit
85bb23e70f
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
|
@ -4,6 +4,10 @@ export default Ember.Application.extend({
|
|||
rootElement: "#custom-wizard-main",
|
||||
Resolver: buildResolver("wizard"),
|
||||
|
||||
customEvents: {
|
||||
paste: "paste",
|
||||
},
|
||||
|
||||
start() {
|
||||
Object.keys(requirejs._eak_seen).forEach((key) => {
|
||||
if (/\/pre\-initializers\//.test(key)) {
|
||||
|
|
|
@ -15,7 +15,7 @@ export default {
|
|||
);
|
||||
const DEditor = requirejs("discourse/components/d-editor").default;
|
||||
const { clipboardHelpers } = requirejs("discourse/lib/utilities");
|
||||
const { toMarkdown } = requirejs("discourse/lib/to-markdown");
|
||||
const toMarkdown = requirejs("discourse/lib/to-markdown").default;
|
||||
|
||||
FieldComponent.reopen({
|
||||
classNameBindings: ["field.id"],
|
||||
|
@ -181,7 +181,7 @@ export default {
|
|||
markdown = pre.match(/\S$/) ? ` ${markdown}` : markdown;
|
||||
}
|
||||
|
||||
this.appEvents.trigger("composer:insert-text", {
|
||||
this.appEvents.trigger("wizard-editor:insert-text", {
|
||||
fieldId: this.fieldId,
|
||||
text: markdown,
|
||||
});
|
||||
|
|
Laden …
In neuem Issue referenzieren