Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
sync file with main
Dieser Commit ist enthalten in:
Ursprung
b5c64e7379
Commit
6454d5fd9b
1 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen
|
@ -12,12 +12,14 @@ import { alias } from "@ember/object/computed";
|
||||||
import Site from "discourse/models/site";
|
import Site from "discourse/models/site";
|
||||||
import { uploadIcon } from "discourse/lib/uploads";
|
import { uploadIcon } from "discourse/lib/uploads";
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
import showModal from "discourse/lib/show-modal";
|
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
|
||||||
|
import { inject as service } from "@ember/service";
|
||||||
|
|
||||||
const IMAGE_MARKDOWN_REGEX =
|
const IMAGE_MARKDOWN_REGEX =
|
||||||
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
||||||
|
|
||||||
export default ComposerEditor.extend({
|
export default ComposerEditor.extend({
|
||||||
|
modal: service(),
|
||||||
|
|
||||||
classNameBindings: ["fieldClass"],
|
classNameBindings: ["fieldClass"],
|
||||||
allowUpload: true,
|
allowUpload: true,
|
||||||
|
@ -198,9 +200,8 @@ export default ComposerEditor.extend({
|
||||||
if (this._lastSel) {
|
if (this._lastSel) {
|
||||||
linkText = this._lastSel.value;
|
linkText = this._lastSel.value;
|
||||||
}
|
}
|
||||||
showModal("insert-hyperlink").setProperties({
|
this.modal.show(InsertHyperlink, {
|
||||||
linkText,
|
model: { linkText, toolbarEvent },
|
||||||
toolbarEvent,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren