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

Render html content? #54

Open
pratiksyngenta opened this issue Jun 11, 2021 · 5 comments
Open

Render html content? #54

pratiksyngenta opened this issue Jun 11, 2021 · 5 comments
Labels
feature request New feature or request

Comments

@pratiksyngenta
Copy link

No description provided.

@alonrbar
Copy link
Owner

Hi,
Not sure I understand exactly what you are asking but generally speaking the library doesn't support HTML input. If you can specify more precisely what you mean, what is the input and what is the expected output I can try and give a more accurate response.

@alonrbar alonrbar added the need more info Further information is requested label Aug 11, 2021
@thegnuu
Copy link
Contributor

thegnuu commented Oct 25, 2021

@alonrbar I am working on a plugin to render prosemirror content, but I have some issues: #58

Since I already have a working HTML converter for my prosemirror stuff it would also be possible to focus on a simple HTML version (most common tags and styles) and send my content via HTML, I guess this approach would be useful for more people, but I first need to figure out those issues.

@rigoramos
Copy link

rigoramos commented Mar 22, 2022

@thegnuu I'd like to know if you could embed the HTML in the word file

@thegnuu
Copy link
Contributor

thegnuu commented Mar 24, 2022

I could yes, technically it is quite easy to render HTML content.

Unfortunately it is not so easy to that in a generic way. The main problem here is the way Word is handling its styles. There are basically two possible ways to go:

  1. Use word styles
  2. Apply custom styles depending on the HTML element directly to rendered content

Version 1 is kinda hard to achieve since every element needs to be mapped to a proper style - unfortunately those styles depends on each file which means you have to add custom styles and you need to make sure those are embedded and language agnostic. So the only way to use this method is to use the same word template for all of your docs. And you need to specify which elements should be mapped to which style.

Version 2 works good for simple elements like <h1>, <p> and to apply properties like colors, unfortunately it works not well on elements like eg. bullet lists, since those elements require styles like in version 1.

Long story short: It possible to render HTML content but for now I have not found a way to simply achieve this goal in a generic way that would allow me to write a plugin that everyone can use.

@alonrbar alonrbar added feature request New feature or request and removed need more info Further information is requested labels Nov 5, 2022
@alonrbar
Copy link
Owner

alonrbar commented Nov 5, 2022

You might want to check the new plugin by @cvaize. The plugin currently implements <br>, <b>, <i> and <u> and can be found here: https://github.com/cvaize/easy-template-x-extension-html.

@alonrbar alonrbar changed the title Question: How to pass html content? Render html content? Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants