react-bootstrap-editor
v2.0.4
Published
Lightweight Rich Text Editor based on TypeScript, React & Bootstrap
Downloads
606
Maintainers
Readme
React Bootstrap editor
Lightweight Rich Text Editor based on Edkit, React & Bootstrap
Demo
https://idea2app.github.io/Edkit/React/
Tools
https://github.com/idea2app/Edkit#tools
Versions
| SemVer | branch | status | ES decorator | MobX | Edkit |
| :------: | :------: | :----------: | :----------: | :---------: | :---: |
| >=2
| master
| ✅developing | stage-3 | >=6.11
| v1 |
| >=1 <2
| master
| ❌deprecated | stage-2 | >=4 <6.11
| v1 |
| <1
| v0.x
| ❌deprecated | | | |
Usage
Installation
Shell command
npm install react react-bootstrap-editor
tsconfig.json
{
"compilerOptions": {
"target": "ES6",
"moduleResolution": "Node",
"useDefineForClassFields": true,
"experimentalDecorators": false,
"jsx": "react-jsx"
}
}
HTML entry
<head>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/font/bootstrap-icons.css"
/>
</head>
Initialization
import { PureComponent } from 'react';
import { Editor } from 'react-bootstrap-editor';
export class PostEdit extends PureComponent {
render() {
return (
<Editor
name="content"
defaultValue="<p>test</p>"
onChange={console.log}
/>
);
}
}