Skip to content

Is it possible to override a serializer for plugin components? #987

Answered by Parsa-Sedigh
vimtor asked this question in Q&A
Discussion options

You must be logged in to vote

You can edit the serialize option of createImagePlugin, like this:

const editorPlugins = [
    {
        ...createImagePlugin(),
        serialize: {
            element: (props) => {
                console.log('in serialize: ', props)
                return <img src={props.element.url} alt={...} />
            }
        }
    },

Replies: 1 comment 1 reply

Comment options

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

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