[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jiannei/milkdown-plugin-placeholder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Milkdown placeholder plugin.

Placeholder plugin for milkdown.

TypeScript NPM Version NPM License

安装

npm i @s2nc/milkdown-plugin-placeholder

使用

import { placeholderCtx, placeholder as placeholderPlugin } from '@s2nc/milkdown-plugin-placeholder'
import { Milkdown, useEditor } from '@milkdown/vue'
import {rootCtx} from '@milkdown/core'

const { loading, get } = useEditor((root) => {
  return Editor.make()
    .config((ctx) => {
      // ...
      
      // 编辑器初始化配置
      ctx.set(rootCtx, root)

      // 覆盖默认的 placeholder
      ctx.set(placeholderCtx, 'placeholder')

    })
    .use([
      placeholderPlugin,// 使用插件
    ])
})

协议

MIT 许可证(MIT)。有关更多信息,请参见协议文件

About

Placeholder plugin for milkdown.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published