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

Trying to export the HTML markup with the CSS styles of blocks #675

Closed
shahyan3 opened this issue Apr 1, 2024 · 2 comments
Closed

Trying to export the HTML markup with the CSS styles of blocks #675

shahyan3 opened this issue Apr 1, 2024 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@shahyan3
Copy link

shahyan3 commented Apr 1, 2024

I want to export the HTML markup with the inline CSS styles as part of the exported html string.

Currently, I am using this function to return a string HTML mark up with the css classes defined on each node editor.blocksToHTMLLossy(editor.document);.

The CSS classes exported are no use for me unless I can export the CSS properties too.

Use case: I am trying to render the blocks as a web page in a new tab whilst maintaining the HTML content structure and CSS styles.

How can I do this?

Misc

  • Node version: v20.12.0
  • Browser: Google Chrome
@shahyan3 shahyan3 added the bug Something isn't working label Apr 1, 2024
@Iam-nishanth
Copy link

I am also trying to deal with this,

Have you found any solution?

@YousefED
Copy link
Collaborator

YousefED commented Apr 8, 2024

Thanks! Seems like a duplicate of #375, right?

@YousefED YousefED closed this as completed Apr 8, 2024
@YousefED YousefED added the duplicate This issue or pull request already exists label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants