update at 2025-10-08 17:32:31
This commit is contained in:
@@ -19,26 +19,21 @@ export class DocModal extends Modal {
|
||||
|
||||
onOpen() {
|
||||
let { contentEl, modalEl } = this;
|
||||
modalEl.style.width = '640px';
|
||||
modalEl.style.height = '720px';
|
||||
contentEl.style.display = 'flex';
|
||||
contentEl.style.flexDirection = 'column';
|
||||
modalEl.addClass('doc-modal');
|
||||
contentEl.addClass('doc-modal-content');
|
||||
|
||||
const titleEl = contentEl.createEl('h2', { text: this.title });
|
||||
titleEl.style.marginTop = '0.5em';
|
||||
const content = contentEl.createEl('div');
|
||||
content.setAttr('style', 'margin-bottom:1em;-webkit-user-select: text; user-select: text;');
|
||||
const titleEl = contentEl.createEl('h2', { text: this.title, cls: 'doc-modal-title' });
|
||||
const content = contentEl.createEl('div', { cls: 'doc-modal-desc' });
|
||||
content.appendChild(sanitizeHTMLToDom(this.content));
|
||||
|
||||
const iframe = contentEl.createEl('iframe', {
|
||||
cls: 'doc-modal-iframe',
|
||||
attr: {
|
||||
src: this.url,
|
||||
width: '100%',
|
||||
allow: 'clipboard-read; clipboard-write',
|
||||
},
|
||||
});
|
||||
|
||||
iframe.style.flex = '1';
|
||||
}
|
||||
|
||||
onClose() {
|
||||
|
||||
Reference in New Issue
Block a user