resolved how to run scripts in articles, added devbreak broadcasts
This commit is contained in:
11
src/lib/articleContent/onMountScripts.ts
Normal file
11
src/lib/articleContent/onMountScripts.ts
Normal file
@ -0,0 +1,11 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
onMountScripts?: Array<() => void>
|
||||
}
|
||||
}
|
||||
export function runOnMountScripts() {
|
||||
window.onMountScripts?.forEach((fn) => {
|
||||
fn()
|
||||
})
|
||||
}
|
||||
|
@ -19,3 +19,9 @@ globalStyle(`${contentClass} img:only-child`, {
|
||||
display: 'block',
|
||||
margin: '0 auto',
|
||||
})
|
||||
|
||||
globalStyle(`${contentClass} .video-embed`, {
|
||||
margin: '0 auto',
|
||||
maxWidth: vars.width.image,
|
||||
aspectRatio: vars.aspectRatio.monitor,
|
||||
})
|
||||
|
Reference in New Issue
Block a user