benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.62k stars 2.71k forks source link

Not Able to Render SVG with abcjs Extension #1372

Open Audiosyncrasy opened 6 years ago

Audiosyncrasy commented 6 years ago

I attempted to utilize the new abcjs extension. The expected behavior is that I use a code block to render ABC text as an SVG image.

Expected: image

Actual: image

Is this a bug, or has the functionality not been fully implemented in the app yet?

flxwu commented 6 years ago

Has been implemented, but probably not published to production yet? @benweet

Audiosyncrasy commented 6 years ago

This appears to be working now. However, I had to add some custom CSS to force the SVG tags to fit onto the page without scrollbars.

When I use the "Styled HTML" template to save to disk, I get the following: image

This rendering issue appears to be related to the fact that the <svg> tags are set to a width of 755 (no units specified): <svg . . . width="755"></svg>

However, the width of the .stackedit__html class, which wraps the markdown document, is set to a max width of 750px: max-width: 750px

flxwu commented 6 years ago

Feel free to open a PR for that :) @Audiosyncrasy