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

Quill editor from and to markdown #2514

Closed
Doidel opened this issue Feb 17, 2019 · 2 comments
Closed

Quill editor from and to markdown #2514

Doidel opened this issue Feb 17, 2019 · 2 comments

Comments

@Doidel
Copy link

Doidel commented Feb 17, 2019

I just wanted to share the solution I use for Quill with markdown. I've used a ton of different markdown editors and solutions (editor.md, tui editor, stackedit...) but then I found this codepen by a guy named "Lee Robert". Those top-notch markdown converters together with Quill work very smoothly.
Basically, he uses the markdown-it library to render markdown to html, then pastes the result to Quill. And on saving he uses the to-markdown library to convert the quill.container.firstChild.innerHTML to markdown.

@silashuereca
Copy link

Thank you for posting this! I'm using this method now and it works so well :)

@duhaime
Copy link

duhaime commented Jan 17, 2022

I think more work needs to be done for this to be a viable option. E.g. the initial state of that pen doesn't render properly:

Screen Shot 2022-01-17 at 10 25 29 AM

One of the problems is that quill's output doesn't capture all of its semantics in HTML. Quill renders the list above, for instance, as:

<ol>
  <li>List Item 1</li>
  <li class="ql-indent-1">Point a</li>
</ol>

I believe the semantic HTML would be:

<ol>
  <li>List Item 1</li>
  <ul>
    <li type='a'>Point a</li>
  </ul>
</ol>

There is more discussion of this issue in #979.

Given these challenges, could you please reopen this issue @Doidel?

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

No branches or pull requests

3 participants