skip to Main Content

How can I render an HTML string in a PowerPoint document?

const htmlString = "<ul>
                     <li>Good</li>
                     <li>Bad</li>
                     <li>Medium</li>
                   </ul>";

can be converted to this in a powerpoint –

  • Good
  • Bad
  • Medium

I’m actually using this to convert the HTML code to a powerpoint using pptxGenjs. I’m using OutSystems for this. So, it saves the custom input box with editable items (list, bold, italics, …) as HTML in the database.

2

Answers


  1. Render the HTML in a web browser (open your .html file with a web browser) then copy and paste the rendered HTML in to Powerpoint.

    Login or Signup to reply.
  2. I think there is some confusion of different terms here. We have

    • Browser: An application that can interpret HTML + CSS and turn it into a visual representation via a rendering engine (among other capabilities). The elements that make up the layout (divs, spans, etc) will be stored in the DOM (Document Object Model), which is just a representation of your webpage in memory.
    • JavaScript: This is a programming language that often runs inside browsers, but can also run in other contexts. It can create, destroy, and modify things in the DOM, and these changes will percolate to the appearance of the webpage itself via the rendering engine
    • Console: Broadly, a simple text-based interface for a runtime environment in which code can be run. There are many, many consoles out there, but I suspect you are referring to the one in the browser’s dev tools (aka, hit F12 from your browser). Most consoles are pretty bare bones and just output plain text with minimal formatting – they aren’t intended to be used as a GUI. That said, I suppose it would be possible for a hypothetical console application to render HTML code like a browser does, but to the best of my knowledge, none of them do this today.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search