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

COMPATIBILITY: composer editor compatibility updates

Dieser Commit ist enthalten in:
angusmcleod 2021-12-22 16:41:38 +08:00
Ursprung 41b5ba4f31
Commit 43c4a1e0d6
3 geänderte Dateien mit 4 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -35,6 +35,7 @@
//= require discourse/app/components/date-time-input
//= require discourse/app/components/text-field
//= require discourse/app/components/d-textarea
//= require discourse/app/components/popup-input-tip
//= require discourse/app/templates/components/conditional-loading-spinner
//= require discourse/app/templates/components/d-button

Datei anzeigen

@ -4,7 +4,7 @@ import {
on,
} from "discourse-common/utils/decorators";
import { findRawTemplate } from "discourse-common/lib/raw-templates";
import { scheduleOnce, throttle } from "@ember/runloop";
import { scheduleOnce } from "@ember/runloop";
import { caretPosition, inCodeBlock } from "discourse/lib/utilities";
import highlightSyntax from "discourse/lib/highlight-syntax";
import { alias } from "@ember/object/computed";
@ -30,7 +30,6 @@ export default ComposerEditor.extend({
@on("didInsertElement")
_composerEditorInit() {
const $input = $(this.element.querySelector(".d-editor-input"));
const $preview = $(this.element.querySelector(".d-editor-preview-wrapper"));
if (this.siteSettings.enable_mentions) {
$input.autocomplete({
@ -72,14 +71,7 @@ export default ComposerEditor.extend({
});
}
if (this._enableAdvancedEditorPreviewSync()) {
this._initInputPreviewSync($input, $preview);
} else {
$input.on("scroll", () =>
throttle(this, this._syncEditorAndPreviewScroll, $input, $preview, 20)
);
}
$input.on("scroll", this._throttledSyncEditorAndPreviewScroll);
this._bindUploadTarget();
const wizardEventNames = ["insert-text", "replace-text"];

Datei anzeigen

@ -6,6 +6,7 @@
@import "common/components/buttons";
@import "common/d-editor";
@import "desktop/modal";
@import "common/input_tip";
@import "custom/base";
@import "custom/wizard";