Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed May 10, 2024
1 parent fe4eb2f commit 9611ca5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ const Example = ({ placeholder }) => {
const editor = useRef(null);
const [content, setContent] = useState('');

const config = useMemo(
{
const config = useMemo(() => ({
readonly: false, // all options from https://xdsoft.net/jodit/docs/,
placeholder: placeholder || 'Start typings...'
},
}),
[placeholder]
);

Expand All @@ -71,7 +70,7 @@ const Example = ({ placeholder }) => {
You can use all Jodit features and write your [own plugin](https://xdsoft.net/jodit/docs/modules/plugin.html) for example.

```js
import JoditEditor, { Jodit } from '../../src/';
import JoditEditor, { Jodit } from 'jodit-react';

/**
* @param {Jodit} jodit
Expand All @@ -96,9 +95,11 @@ function preparePaste(jodit) {
Jodit.plugins.add('preparePaste', preparePaste);

//...
return <JoditEditor/>;
return <JoditEditor />;
```

You can see how to write plugins [in the documentation](https://xdsoft.net/jodit/pro/docs/how-to/create-plugin.md) or [on the stand](https://xdsoft.net/jodit/pro/docs/getting-started/examples.md#jodit-example-paste-link)

## License

This package is available under `MIT` License.

0 comments on commit 9611ca5

Please sign in to comment.