Skip to content

How to use custom WYSIWYG? #1620

Answered by mlhekinci
ilikali asked this question in Q&A
Mar 10, 2022 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @ilikali, sorry for my late response. I created a custom react-draftjs-wysiwyg example with refine for you. When using custom component with react-hook-form, you need to manage it with Controller. On the refine Create page, we have defined the Editor component in the Controller and registered it. In the next step, the refine onFinish method automatically saves the content you created in the Editor to your database.

import { useForm, Controller } from "@pankod/refine-react-hook-form";
import { EditorJs } from "components/editor";

export const PostCreate: React.FC = () => {
  const {
    refineCore: { onFinish, formLoading },
    register,
    handleSubmit,
    control,
    formState: {

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@ilikali
Comment options

@omeraplak
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ilikali
Comment options

Answer selected by mlhekinci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants