editor: disable wrapping for all lines in codeblocks

This commit is contained in:
Abdullah Atta
2023-03-06 15:02:18 +05:00
committed by Abdullah Atta
parent fc5ea0ad51
commit cb644dbea6

View File

@@ -553,7 +553,7 @@ export const CodeBlock = Node.create<CodeBlockOptions>({
contentDOMFactory: () => {
const content = document.createElement("div");
content.classList.add("node-content-wrapper");
content.style.whiteSpace = "inherit";
content.style.whiteSpace = "pre";
// caret is not visible if content element width is 0px
content.style.minWidth = "20px";
return { dom: content };