- Place the cursor where you want to insert the code block.
- Type
autocodeblock
oracb
in the slash menu and press Enter. - Input or paste the code block.
- Click OK.
- Copy your from code somewhere
- Paste into SiYuan, and it will automatically detect language and set highlight regarding to the specific language.
Q: The content that is not code after pasting is recognized as code? A: You can try Siyuan's paste as plain text shortcut (default is Ctrl+Shift+V), or right click - paste as plain text, or turn off automatic pasting and only use the slash menu.
- Improve the elegance of the slash menu popup.
- Automatically adjust the language in the context menu of the code block.
- Automatically adjust the language in the context menu of the document.
- Automatically adjust the language for all code blocks.
- Fix bugs.