How to paste HTML so that it renders [closed]

asked 2014-11-26 21:30:48 +0200

sakovias gravatar image

updated 2016-03-06 17:31:13 +0200

Alex Kemp gravatar image

I'm using code highliter tohtml to create HTML code out of plain text file with a program. When I paste the HTML into LibreOffice Writer or Impress it is pasted as-is, i.e. just the HTML code is shown. The same operation in Google Docs or MS Word works as expected - the HTML if it's rendered in the browser.

Alternatively, I'd use built-in code highliter, but I couln't find such a tool. I'm using LibreOffice on Ubuntu 14.04.

Here's a sample HTML code

<pre style='color:#d1d1d1;background:#000000;'><html><body style='color:#d1d1d1; background:#000000; '><pre>
class Message def self.haha puts "haha" end end

that should render the following Ruby code

class Message
  def self.haha
    puts "haha"

I also tried to wrap the HTML code into HTML5 template, but pasting didn't succeed.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2016-03-06 17:31:21.242416


Valid question, I was just searching how to paste copied html source into libre office. Why was this closed?

akostadinov gravatar imageakostadinov ( 2017-01-23 14:54:16 +0200 )edit