Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm completely puzzled - I'm sure I've done this before, but now I fail. I have a local .html text, which opens up in Firefox just fine.

Then I try to open the same file in swriter (or lowriter); and regardless if I specify on command line - or I try File / Open and then select "HTML Document (OpenOffice.org Writer)" or "Web Pages" from the file open extension filter - instead of getting formatted text as I expect, I first get something called "ASCII filter options":

ascii_filter_options.png

... and then the HTML source code gets loaded as "plain text" in Writer ??!:

bad_plain_source_import_in_writer.png

I'd otherwise expect the "HTML formatted" or "rich text" to appear (i.e. bold, italic)... Anyone have an idea what is going on?

Many thanks in advance for any answers,
Cheers!

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Ahhh, damn it, this is so dumb - well, as you can see on the screenshot, my HTML file actually starts with:

<?xml version="1.0" encoding="iso-8859-1" ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd-->  
<html xmlns="http://www.w3.org/1999/xhtml"  
> 
<head><title></title> 
...

Turns out, Open/LibreOffice Writer MUST see a starting <html> tag - otherwise it apparently does not consider the file to be HTML at all!! (in contrast, Firefox does not care, and opens this same file happily).

So I just opened the HTML in a text editor, deleted the first few lines - and now that the HTML file starts with:

<html xmlns="http://www.w3.org/1999/xhtml"  
> 
<head><title></title> 
...

... Open/LibreOffice Writer also happily opens it as "rich text".

Damn it, wish this wasn't so convoluted :) ... Cheers!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.