Prevent overriding 'whiteSpace' styling for NodeView React components (#2884)

Fixes ueberdosis/tiptap#2883
This commit is contained in:
Shaun Tan 2022-06-21 01:41:33 +08:00 committed by GitHub
parent d9430e5163
commit 8a5b3cf67a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
ref={nodeViewContentRef}
data-node-view-content=""
style={{
...props.style,
whiteSpace: 'pre-wrap',
...props.style,
}}
/>
)

View File

@ -18,8 +18,8 @@ export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = React.forwardRef(
data-node-view-wrapper=""
onDragStart={onDragStart}
style={{
...props.style,
whiteSpace: 'normal',
...props.style,
}}
/>
)