@aeaton/react-prosemirror
Advanced tools
Comparing version 2.0.0-alpha.3 to 2.0.0
@@ -6,4 +6,4 @@ # Change Log | ||
# 2.0.0-alpha.3 (2021-03-04) | ||
# [2.0.0](https://github.com/hubgit/react-prosemirror/compare/@aeaton/react-prosemirror@0.22.1...@aeaton/react-prosemirror@2.0.0) (2021-03-30) | ||
**Note:** Version bump only for package @aeaton/react-prosemirror |
{ | ||
"name": "@aeaton/react-prosemirror", | ||
"version": "2.0.0-alpha.3", | ||
"version": "2.0.0", | ||
"main": "index.js", | ||
@@ -13,3 +13,3 @@ "source": "index.ts", | ||
"dependencies": { | ||
"@aeaton/prosemirror-transformers": "^2.0.0-alpha.3" | ||
"@aeaton/prosemirror-transformers": "^2.0.0" | ||
}, | ||
@@ -22,3 +22,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "3e8f8b94fe38fdfa49aa0253111af8cdc3ad4f54" | ||
"gitHead": "4546a08ed9cfbfe52f047d97d0b5a7eeba93375e" | ||
} |
@@ -9,6 +9,2 @@ ## Installation | ||
## Demo | ||
[View demo](https://react-prosemirror-example.now.sh/) | ||
## Usage | ||
@@ -19,17 +15,23 @@ | ||
```jsx | ||
import { HtmlEditor, Editor, Toolbar } from '@aeaton/react-prosemirror' | ||
import { schema, plugins, toolbar } from '@aeaton/react-prosemirror-config-default' | ||
import { HtmlEditor } from '@aeaton/react-prosemirror' | ||
import { plugins, schema, toolbar } from '@aeaton/react-prosemirror-config-default' | ||
export const CustomEditor = ({ value, handleChange }) => ( | ||
<HtmlEditor | ||
schema={schema} | ||
plugins={plugins} | ||
value={value} | ||
handleChange={handleChange} | ||
> | ||
<Toolbar toolbar={toolbar} /> | ||
<Editor /> | ||
</HtmlEditor> | ||
) | ||
const initialValue = '<p></p>' | ||
export const RichTextEditor = () => { | ||
const [value, setValue] = useState(initialValue) | ||
return ( | ||
<HtmlEditor | ||
schema={schema} | ||
plugins={plugins} | ||
value={initialValue} | ||
handleChange={setValue} | ||
debounce={250} | ||
> | ||
<Toolbar toolbar={toolbar} /> | ||
<Editor autoFocus /> | ||
</HtmlEditor> | ||
) | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
36
4261
7
65