feat(slides): add sandboxed Reveal.js viewer and editor preview
Build and publish container images / images (push) Successful in 9m2s
Release container images / release (push) Successful in 21s

This commit is contained in:
Anya Tokugawa committed 2026-11-08 22:10:52 +09:00
1 parent 09afb438c9
commit 02fb77f72b
30 files changed
+532 -9

No files matched your search

+12
View File
@@ -29,6 +29,12 @@ window.PagesEditor = {
if (action === 'delete') window.PagesPathActions?.removeCurrentPath()
if (action === 'html' || action === 'markdown') this.switchFormat(action)
if (action === 'preview') window.toggleEditorPreview()
if (action === 'slides' && window.PagesSlides) {
this.slidePreview=!this.slidePreview
button.setAttribute('aria-pressed',String(this.slidePreview))
if(this.slidePreview)window.setEditorPreviewVisible?.(true)
this.renderPreview()
}
if (action === 'tools') this.tools()
if (action === 'language') this.languageDialog()
if (action === 'restore') this.historyDialog()
@@ -209,10 +215,16 @@ window.PagesEditor = {
},{signal:controller.signal})
if (controller.signal.aborted || text !== this.text()) return
this.preview.classList.remove('code-preview')
if (this.slidePreview && window.PagesSlides) {
try {window.PagesSlides.render(this.preview,data.html,window.PagesWikiCurrentPath||'/');return}
catch {window.PagesSlides.clear(this.preview);this.preview.textContent=this.ja?'スライドの上限を超えています(256 KiB・100枚)。通常プレビューを使用してください。':'Slide limits exceeded (256 KiB, 100 slides). Use normal preview.';return}
}
window.PagesSlides?.clear(this.preview)
this.preview.innerHTML = data.html
window.PagesWikiLoadChildren?.(this.preview)
} catch (error) {
if (controller.signal.aborted) return
window.PagesSlides?.clear(this.preview)
this.preview.classList.add('code-preview'); this.preview.textContent=text
this.fail(error)
}