Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option for setting html into preview #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cornerman
Copy link

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.

Copy link
Owner

@Ionaru Ionaru left a comment

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.

None yet

2 participants