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]] 这种写法

支持excalidraw svg图片渲染

mermaid 拖拽

  • 基于 rehype-mermaid实现的插件, 支持常用的mermaid功能
  • 使用mermaid标准语法即可,支持复制mermaid代码
CUSTOMERORDERLINE-ITEMDELIVERY-ADDRESSplacescontainsusesxxx

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 numbers
console.log('Greetings from line 2!')
console.log('I am on line 3')
// Line numbers are disabled for this block
console.log('Hello?')
console.log('Sorry, do you know what line I am on?')
Collapsible Block
5 collapsed lines
// All this boilerplate setup code will be collapsed
import { 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 default
engine.doSomething(1, 2, 3, calcFn)
function calcFn() {
// You can have multiple collapsed sections
3 collapsed lines
const a = 1
const b = 2
return a + b
}

Here is a code sample:

Terminal window
pwd
---
After pressing enter, the `pwd` command will output the current directory
your terminal is in.
---
// Example with wrap
function 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=false
function 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"
line-markers.js
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'
}
labeled-line-markers.jsx
<button
role="button"
{...props}
value={value}
className={buttonClassName}
disabled={disabled}
active={active}
>
{children &&
!active &&
(typeof children === 'string' ? <span>{children}</span> : children)}
</button>
labeled-line-markers.jsx
<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 inserted
this line will be marked as deleted
this is a regular line