feat(popup) display newlines

This commit is contained in:
Tal Wrii 2024-12-28 21:06:16 +01:00
parent 94fa4e3b68
commit eb2bb0b0bd

View file

@ -435,7 +435,12 @@ function popup(app: App, editor: Editor, message: string): Promise<void> {
export class Popup extends Modal {
constructor(app: App, msg: string, resolve: () => void) {
super(app);
this.setContent(msg)
let el = new DocumentFragment()
let pre = el.createEl("pre")
pre.appendText(msg)
this.setContent(el)
new Setting(this.contentEl).addButton((btn) => {
btn.setButtonText("OK")