Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(paragraph): get rid of superfluous ParagraphView component
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Sep 18, 2024
commit c5fa33c29f21235ff4070204cf87e6dc12037c0e
4 changes: 2 additions & 2 deletions src/css/prosemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ div.ProseMirror {
padding: .5em 0;
}

p .paragraph-content {
p {
margin-bottom: 1em;
line-height: 150%;
}
Expand Down Expand Up @@ -280,7 +280,7 @@ div.ProseMirror {
position: relative;
padding-left: 3px;

p .paragraph-content {
p {
margin-bottom: 0.5em;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/Callout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {

.callout__content {
margin-left: 1em;
&:deep(p .paragraph-content) {
&:deep(p) {
&:last-child {
margin-bottom: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/DetailsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ div.details {
}
}

:deep(.details-content .paragraph-content:last-child) {
:deep(.details-content p:last-child) {
margin-bottom: 0.5em;
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/nodes/Paragraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
import TiptapParagraph from '@tiptap/extension-paragraph'
import { VueNodeViewRenderer } from '@tiptap/vue-2'
import previewOptions from '../plugins/previewOptions.js'
import ParagraphView from './ParagraphView.vue'

const Paragraph = TiptapParagraph.extend({

addNodeView() {
return VueNodeViewRenderer(ParagraphView)
},

parseHTML() {
return this.parent().map(rule => Object.assign(rule, { preserveWhitespace: 'full' }))
},
Expand Down
28 changes: 0 additions & 28 deletions src/nodes/ParagraphView.vue

This file was deleted.