feat: add image alignment options and enhance image handling in ArticleEditorCanvas
This commit is contained in:
@@ -7,7 +7,7 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const renderer = new MarkdownIt({
|
||||
html: false,
|
||||
html: true,
|
||||
linkify: true,
|
||||
breaks: true,
|
||||
});
|
||||
@@ -84,6 +84,28 @@ const html = computed(() => renderer.render(props.content || ""));
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.markdown-preview :deep(p.article-editor-image) {
|
||||
margin: 1.25em 0;
|
||||
}
|
||||
|
||||
.markdown-preview :deep(p.article-editor-image[align="left"]) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown-preview :deep(p.article-editor-image[align="center"]) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.markdown-preview :deep(p.article-editor-image[align="right"]) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.markdown-preview :deep(p.article-editor-image img) {
|
||||
max-width: min(100%, 960px);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.markdown-preview :deep(table) {
|
||||
width: 100%;
|
||||
margin: 0 0 1em;
|
||||
|
||||
Reference in New Issue
Block a user