feat: border around images

This commit is contained in:
hugeblank 2024-12-03 13:07:24 -08:00
parent 4051184fdb
commit 01edc270d2
2 changed files with 23 additions and 17 deletions

View file

@ -17,23 +17,23 @@ import type { Plugin } from "unified";
const customSchema = { const customSchema = {
...defaultSchema, ...defaultSchema,
attributes: { attributes: {
...defaultSchema.attributes, ...defaultSchema.attributes,
font: [...(defaultSchema.attributes?.font ?? []), 'color'], font: [...(defaultSchema.attributes?.font ?? []), 'color'],
blockquote: [ blockquote: [
...(defaultSchema.attributes?.blockquote ?? []), ...(defaultSchema.attributes?.blockquote ?? []),
// bluesky // bluesky
'className', 'className',
'dataBlueskyUri', 'dataBlueskyUri',
'dataBlueskyCid', 'dataBlueskyCid',
// instagram // instagram
'dataInstgrmCaptioned', 'dataInstgrmCaptioned',
'dataInstgrmPermalink', 'dataInstgrmPermalink',
'dataInstgrmVersion' 'dataInstgrmVersion'
], ],
iframe: [ iframe: [
'width', 'height', 'title', 'frameborder', 'allow', 'referrerpolicy', 'allowfullscreen', 'style', 'seamless', 'width', 'height', 'title', 'frameborder', 'allow', 'referrerpolicy', 'allowfullscreen', 'style', 'seamless',
['src', /https:\/\/(www.youtube.com|bandcamp.com)\/.*/] ['src', /https:\/\/(www.youtube.com|bandcamp.com)\/.*/]
], ],
section: ['dataFootnotes', 'className'] section: ['dataFootnotes', 'className']
}, },
tagNames: [...(defaultSchema.tagNames ?? []), 'font', 'mark', 'iframe', 'section'] tagNames: [...(defaultSchema.tagNames ?? []), 'font', 'mark', 'iframe', 'section']

View file

@ -16,6 +16,12 @@ export default {
}, },
'[type="checkbox"]': { '[type="checkbox"]': {
'border-radius': '5px' 'border-radius': '5px'
},
'img': {
'border-style': 'solid',
'border-color': 'gray',
'border-width': '1px',
'border-radius': '1em'
} }
}, },
}, },