todo
- canvas support
- broken-link or file css
- keyborad
- image modal , 任意图片的弹窗放大
2024-11-29 15:35:02
excalidraw svg图片嵌入和缩放
- tips: obsdian excalildraw插件中设置自动保存为svg格式的图片, 更方便一些
- 语法可以直接使用
![[xxx.svg]]
这种写法
mermaid 拖拽
- 基于 rehype-mermaid实现的插件, 支持常用的mermaid功能
- 使用mermaid标准语法即可,支持复制mermaid代码
2024-11-27 16:09:57
代码高亮插件
- 替换为 expressive-code 代码语法高亮插件
- 暂不支持ignore某些language, 使用中会和mermaid语法冲突,导致mermaid无法渲染
- 该高亮插件语法相比quartz内置的
rehype-pretty-code
更为丰富, 可以实现和obsidian中的 shiki-highlighter 插件一致的高亮效果
demo
// This code block will show line numbersconsole.log('Greetings from line 2!')console.log('I am on line 3')
// Line numbers are disabled for this blockconsole.log('Hello?')console.log('Sorry, do you know what line I am on?')
5 collapsed lines
// All this boilerplate setup code will be collapsedimport { someBoilerplateEngine } from '@example/some-boilerplate'import { evenMoreBoilerplate } from '@example/even-more-boilerplate'
const engine = someBoilerplateEngine(evenMoreBoilerplate())
// This part of the code will be visible by defaultengine.doSomething(1, 2, 3, calcFn)
function calcFn() { // You can have multiple collapsed sections3 collapsed lines
const a = 1 const b = 2 return a + b}
Here is a code sample:
pwd
---After pressing enter, the `pwd` command will output the current directoryyour terminal is in.---
// Example with wrapfunction getLongString() { return 'This is a very long string that will most probably not fit into the available space unless the container is extremely wide'}
// Example with wrap=falsefunction getLongString() { return 'This is a very long string that will most probably not fit into the available space unless the container is extremely wide'}
// Line 1 - targeted by line number// Line 2// Line 3// Line 4 - targeted by line number// Line 5// Line 6// Line 7 - targeted by range "7-8"// Line 8 - targeted by range "7-8"
function demo() { console.log('this line is marked as deleted') // This line and the next one are marked as inserted console.log('this is the second inserted line')
return 'this line uses the neutral default marker type'}
<button role="button" {...props} value={value} className={buttonClassName} disabled={disabled} active={active}> {children && !active && (typeof children === 'string' ? <span>{children}</span> : children)}</button>
<button role="button" {...props}
value={value} className={buttonClassName}
disabled={disabled} active={active}>
{children && !active && (typeof children === 'string' ? <span>{children}</span> : children)}</button>
function thisIsJavaScript() { // This entire block gets highlighted as JavaScript, // and we can still add diff markers to it! console.log('Old code to be removed') console.log('New and shiny code!')}
this line will be marked as insertedthis line will be marked as deletedthis is a regular line