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

Same input generate different html between viewer and editor #1045

Closed
seb-saletes opened this issue Jun 11, 2020 · 3 comments
Closed

Same input generate different html between viewer and editor #1045

seb-saletes opened this issue Jun 11, 2020 · 3 comments
Milestone

Comments

@seb-saletes
Copy link

seb-saletes commented Jun 11, 2020

Describe the bug

Html generated by viewer and editor are not consistent.

To Reproduce

Input : # Title\n
html generated in editor:
<h1><div>Title</div><br></h1>
html generated in viewer:
<h1>Title</h1>

Expected behavior

Editor and viewer should generate same html for same input. That way we can switch between mode without breaking style.

Screenshots

HTML generated by Editor
HTML generated by Viewer

@seonim-ryu
Copy link
Member

@seb-saletes This is not a problem with different tags. This is because the editor's default font family is not defined in the style used by the Viewer. Thanks for reporting the issue.

@seb-saletes
Copy link
Author

Thanks for your quick reply.
I'm not sure to understand, what would be the editor output after the fix ?
Could you recommend a workaround until the fix land to release ?

@seonim-ryu
Copy link
Member

@seb-saletes I think adding the font-family to the class selector below will make the Editor and Viewer style the same.

.tui-editor-contents {
  font-family: 'Open Sans', 'Helvetica Neue', 'Helvetica', 'Arial', '나눔바른고딕', 'Nanum Barun Gothic', '맑은고딕', 'Malgun Gothic', sans-serif;
}

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

No branches or pull requests

2 participants