Bug 120590 - wishing unstiled html save/export FILESAVE
Summary: wishing unstiled html save/export FILESAVE
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:html
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2018-10-14 16:17 UTC by boicottms
Modified: 2019-04-14 13:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description boicottms 2018-10-14 16:17:15 UTC
Description:
I wish the ability to save to plain, unstiled html5: 
tags only without any formatting, semantic structure only.
Thank you

Steps to Reproduce:
1.save some styled paragraph as html
2.
3.

Actual Results:
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><font size="2" style="font-size: 11pt">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></p>

Expected Results:
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Buovjaga 2018-11-25 17:10:37 UTC
Sounds rather like a job for an extension.

I looked at HTML Tidy, http://www.html-tidy.org/ but unfortunately its simple command line options do not have a way to strip all the stuff you want. Using its API everything should be possible.

For now, you can use an online tool like https://html-cleaner.com/ - its default options will do exactly what you want! It seems to be using TinyMCE, a popular rich text editor, which is typical in CMSes.
Comment 2 Heiko Tietze 2018-11-26 12:12:37 UTC
(In reply to Buovjaga from comment #1)
> Sounds rather like a job for an extension.

My opinion as well. The question is if HTML editing is in-scope of an office suite or not. I see it as a nice-to-have but not core feature and would let the details such as this tidying to external tools. 

OTOH, do we really need these default settings? <p class="western" style="margin-bottom: 0cm; line-height: 100%"> If possible, I would export just a <p> when the default is used.
Comment 3 boicottms 2019-04-14 13:10:31 UTC
(In reply to Heiko Tietze from comment #2)

> 
> OTOH, do we really need these default settings? <p class="western"
> style="margin-bottom: 0cm; line-height: 100%"> If possible, I would export
> just a <p> when the default is used.

that's exactly what I meant.