Renderless
tiptap comes without any CSS. But there are still some things you should keep in mind.
By default tiptap will add white-space: pre-wrap;
to the DOM, which is required to work correctly. If you want to use some custom nodes with a complex view, this can lead to unexpected effects. You can set white-space: normal;
to elements which contain no text. Since non-editable elements should have a contenteditable="false"
attribute you may add this to your styling:
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="true"] {
white-space: pre-wrap;
}
← Events