Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,36 @@ const MyComponent = props => {
export default MyComponent;
```

### Next.js 13

In Next.js 13, you need to use the new `use client` declarative.

```jsx
// components/Editor.js
'use client'
import SunEditor from 'suneditor-react'
import 'suneditor/dist/css/suneditor.min.css'

export default function Editor() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we accept the SunEditor props and spread it in <SunEditor />?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed that.

return <SunEditor />
}
```

```jsx
// page.jsx
import SunEditor from 'components/Editor'

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

# Props

## About Core
Expand Down