We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
plaintext: 'plain'
1 parent 62d9741 commit bfd02c1Copy full SHA for bfd02c1
packages/web/src/javascripts/Components/SuperEditor/Plugins/Blocks/Code.tsx
@@ -13,10 +13,10 @@ export const CodeBlock = {
13
const selection = $getSelection()
14
if ($isRangeSelection(selection)) {
15
if (selection.isCollapsed()) {
16
- $setBlocksType(selection, () => $createCodeNode())
+ $setBlocksType(selection, () => $createCodeNode('plain'))
17
} else {
18
const textContent = selection.getTextContent()
19
- const codeNode = $createCodeNode()
+ const codeNode = $createCodeNode('plain')
20
selection.insertNodes([codeNode])
21
selection.insertRawText(textContent)
22
}
0 commit comments