Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
detach preview styling from markdown-body style
Browse files Browse the repository at this point in the history
  • Loading branch information
darling committed Oct 30, 2023
1 parent d2d9f49 commit 346c0a2
Showing 1 changed file with 34 additions and 23 deletions.
57 changes: 34 additions & 23 deletions lib/components/base/MarkdownEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
<span class="label__title">Preview</span>
<span class="label__description"></span>
</span>
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(linkMarkdown)"
/>
<div class="markdown-body-wrapper">
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(linkMarkdown)"
/>
</div>
<div class="input-group push-right">
<Button :action="() => linkModal?.hide()"><XIcon /> Cancel</Button>
<Button
Expand Down Expand Up @@ -122,11 +124,13 @@
<span class="label__title">Preview</span>
<span class="label__description"></span>
</span>
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(imageMarkdown)"
/>
<div class="markdown-body-wrapper">
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(imageMarkdown)"
/>
</div>
<div class="input-group push-right">
<Button :action="() => imageModal?.hide()"><XIcon /> Cancel</Button>
<Button
Expand Down Expand Up @@ -173,11 +177,14 @@
<span class="label__title">Preview</span>
<span class="label__description"></span>
</span>
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(videoMarkdown)"
/>

<div class="markdown-body-wrapper">
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(videoMarkdown)"
/>
</div>
<div class="input-group push-right">
<Button :action="() => videoModal?.hide()"><XIcon /> Cancel</Button>
<Button
Expand Down Expand Up @@ -243,12 +250,15 @@
</span>
</div>
</div>
<div
v-if="previewMode"
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(currentValue ?? '')"
/>
<div v-if="previewMode">
<div class="markdown-body-wrapper">
<div
style="width: 100%"
class="markdown-body"
v-html="renderHighlightedString(currentValue ?? '')"
/>
</div>
</div>
</div>
</template>

Expand Down Expand Up @@ -633,7 +643,7 @@ function openVideoModal() {
}
</script>

<style scoped lang="scss">
<style lang="scss">
.file-input {
width: 100%;
padding: 1.5rem;
Expand Down Expand Up @@ -737,9 +747,10 @@ function openVideoModal() {
gap: var(--gap-xs);
}
.markdown-body {
.markdown-body-wrapper {
border: 1px solid var(--color-button-bg);
border-radius: var(--radius-md);
width: 100%;
padding: var(--radius-md);
min-height: 6rem;
}
Expand Down

0 comments on commit 346c0a2

Please sign in to comment.