Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Ensure our custom paste logic is running
Dieser Commit ist enthalten in:
Ursprung
58b3bc13c9
Commit
f742626786
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