Is it possible to override a serializer for plugin components? #987
-
Hi there! I would like to override how images are being serialized to HTML. I've tried in the options but it does not seem like an option (hehe) Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
Parsa-Sedigh
Nov 24, 2021
Replies: 1 comment 1 reply
-
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={...} />
}
}
}, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zbeyens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can edit the serialize option of createImagePlugin, like this: