Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render

This commit is contained in:
2026-06-04 07:52:57 +02:00
parent 0b33a1b074
commit 15870ddb1f
191 changed files with 15453 additions and 1786 deletions

View File

@@ -3,12 +3,31 @@ import React from 'react'
import { createInertiaApp } from '@inertiajs/react'
import UploadPage from './Pages/Upload/Index'
const pages = {
const staticPages = {
'Upload/Index': UploadPage,
}
const dynamicPages = Object.fromEntries(
Object.entries(import.meta.glob('./Pages/Enhance/**/*.jsx')).map(([path, resolver]) => [
path.replace('./Pages/', '').replace('.jsx', ''),
resolver,
])
)
createInertiaApp({
resolve: (name) => pages[name],
resolve: (name) => {
if (staticPages[name]) {
return staticPages[name]
}
const page = dynamicPages[name]
if (!page) {
throw new Error(`Unknown upload page: ${name}`)
}
return page().then((module) => module.default)
},
setup({ el, App, props }) {
mountInertiaRoot(el, App, props)
},