Skip to content

Commit

Permalink
version and readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhstar committed May 20, 2021
1 parent 0e704d5 commit b14ac92
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,31 @@ const MyComponent = props => {
export default MyComponent;
```


### [Next.js](https://nextjs.org/)

To use suneditor-react with Next.js, please use the dynamic import syntax like below:

```javascript
import React from 'react';
import dynamic from "next/dynamic";
import 'suneditor/dist/css/suneditor.min.css'; // Import Sun Editor's CSS File

const SunEditor = dynamic(() => import("suneditor-react"), {
ssr: false,
});

const MyComponent = props => {
return (
<div>
<p> My Other Contents </p>
<SunEditor />
</div>
);
};
export default MyComponent;
```

# Props

## About Core
Expand Down Expand Up @@ -596,6 +621,20 @@ render() {
```


**onResizeEditor**

**_Has the editor been resized?_**

```javascript
handleOnResizeEditor(height, prevHeight){
console.log(height, prevHeight)
}
render() {
return <SunEditor onResizeEditor={handleOnResizeEditor} />
}
```


**onCopy**

**_Has something been copied from the suneditor?_**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "suneditor-react",
"version": "3.0.1",
"version": "3.1.0",
"description": "A React Component for Suneditor",
"repository": {
"type": "git",
Expand Down

0 comments on commit b14ac92

Please sign in to comment.