1.0.8 • Published 2 years ago

@gulibs/prosemirror-plugin-placeholder v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

prosemirror-plugin-placeholder

Prosemirror插件,增加placeholder功能

NPM JavaScript Style Guide

Install

npm install --save @gulibs/prosemirror-plugin-placeholder

or

yarn add @gulibs/prosemirror-plugin-placeholder

Usage

如果不知道怎么添加插件可以查看官网文档。示例代码是根据

import React from 'react';
import { Card } from 'antd';
import { ProseMirrorEditor, EditorToolBar } from '@gulibs/react-prosemirror-editor-x';
import { placeholder } from '@gulibs/prosemirror-plugin-placeholder';

class Example extends React.Component {
    render() {
        return (
            <ProseMirrorEditor
                config={{
                    schema,
                    plugins: [
                        placeholder()
                    ]
                }}
                autoFocus
                onRender={({ editor }) => (
                    <Card
                    type="inner"
                    bordered={false}
                    >
                    <EditorToolBar menus={menus} />
                    {editor}
                    </Card>
                )}
                >
            </ProseMirrorEditor>
        )
    }
}

License

MIT © AnizGu

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago