Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NodeViewContent): Don't set white-space: pre-wrap #4624

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 2 additions & 1 deletion src/nodes/Callout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
</template>

<script>
import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2'
import { NodeViewWrapper } from '@tiptap/vue-2'
import NodeViewContent from './NodeViewContent.js'
import { Positive, Warn, Danger, Info } from '../components/icons.js'

const ICONS_MAP = {
Expand Down
3 changes: 2 additions & 1 deletion src/nodes/Heading/HeadingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@

<script>
import Vue from 'vue'
import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2'
import { NodeViewWrapper } from '@tiptap/vue-2'
import NodeViewContent from '../NodeViewContent.js'
import { useEditorMixin } from '../../components/Editor.provider.js'

export default Vue.extend({
Expand Down
20 changes: 20 additions & 0 deletions src/nodes/NodeViewContent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Vue from 'vue'

const NodeViewContent = Vue.extend({
props: {
as: {
type: String,
default: 'div',
},
},

render(createElement) {
return createElement(this.as, {
attrs: {
'data-node-view-content': '',
},
})
},
})

export default NodeViewContent
3 changes: 2 additions & 1 deletion src/nodes/ParagraphView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
</template>

<script>
import { NodeViewContent, nodeViewProps, NodeViewWrapper } from '@tiptap/vue-2'
import { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-2'
import { getCurrentUser } from '@nextcloud/auth'
import { NcReferenceList } from '@nextcloud/vue/dist/Components/NcRichText.js'
import debounce from 'debounce'
import NodeViewContent from './NodeViewContent.js'

export default {
name: 'ParagraphView',
Expand Down
3 changes: 2 additions & 1 deletion src/nodes/Table/TableCellView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
</template>

<script>
import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2'
import { NodeViewWrapper } from '@tiptap/vue-2'
import { NcActions, NcActionButton } from '@nextcloud/vue'
import NodeViewContent from '../NodeViewContent.js'
import { TableAddRowBefore, TableAddRowAfter, Delete } from '../../components/icons.js'

export default {
Expand Down
3 changes: 2 additions & 1 deletion src/nodes/Table/TableHeaderView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@
</template>

<script>
import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2'
import { NodeViewWrapper } from '@tiptap/vue-2'
import { NcActions, NcActionButton } from '@nextcloud/vue'
import NodeViewContent from '../NodeViewContent.js'
import InlineActionsContainer from '../../components/InlineActionsContainer.vue'
import {
AlignHorizontalCenter,
Expand Down
3 changes: 2 additions & 1 deletion src/nodes/Table/TableView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
</template>

<script>
import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2'
import { NodeViewWrapper } from '@tiptap/vue-2'
import { NcActions, NcActionButton } from '@nextcloud/vue'
import NodeViewContent from '../NodeViewContent.js'
import { TableSettings, Delete } from '../../components/icons.js'

export default {
Expand Down
Loading