Skip to content

option for setting html into preview#205

Open
cornerman wants to merge 1 commit into
Ionaru:masterfrom
cornerman:set-preview-html
Open

option for setting html into preview#205
cornerman wants to merge 1 commit into
Ionaru:masterfrom
cornerman:set-preview-html

Conversation

@cornerman

Copy link
Copy Markdown

This PR adds an option to set the preview html. Currently, we use preview.innerHTML = html which is still the default. Now we allow users to render the html differently into the dom.

My use-case is that setting innerHTML leads to flickering when an image is inside the preview. This way, I can now use html-to-react for the generated html and then render with react - which does the diffing for me. Maybe not a perfect solution, but for me this works much better now.

@Ionaru Ionaru left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This would need some documentation on the new option setPreviewRender

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants