简体   繁体   English

从LibreOffice Writer导出HTML

[英]HTML export from LibreOffice Writer

I want to export formatted text from LibreOffice to HTML. 我想将LibreOffice中的格式化文本导出为HTML。 By default, it is exported with lot of inline styles. 默认情况下,它会导出许多内联样式。

Is it possible to keep the semantics of the formatting ( <p> , <ul> , <h2> and so on), but get rid of the inline styles? 是否可以保留格式的语义( <p><ul><h2>等),但摆脱内联样式?

For example, I get <p lang="de-DE" class="western" align="justify" style="margin-bottom: 0in"> 例如,我得到<p lang="de-DE" class="western" align="justify" style="margin-bottom: 0in">

What I want is just: <p> 我想要的只是: <p>

Thanks and regards, 谢谢并恭祝安康,

Adriana 阿德里安娜

If you are using an automated HTML converter type situation you kinda just have to take what you get and modify it yourself. 如果您使用的是自动HTML转换器类型的情况,您只需要获取所获得的内容并自行修改。 The reason it has all of the styling is because it needs that to make the exported html file look like the libreoffice file. 它具有所有样式的原因是因为它需要使导出的html文件看起来像libreoffice文件。 From what you said, it looks like you don't want all of the style from libreoffice and you just want it to look like a barebones html document. 从你所说的,看起来你不想要libreoffice的所有风格,你只是希望它看起来像一个准系统的HTML文档。 These defeats the purpose of using libreoffice to export the html rather than just creating the html document from scratch from a bare bones text editor or and IDE. 这些失败了使用libreoffice导出html的目的,而不是仅仅从一个简单的文本编辑器或IDE创建html文档。 If the document you are trying to convert is already a libreoffice document, I would recommend just copying and pasting the sections you want into a barebones document in the tags you want. 如果您尝试转换的文档已经是libreoffice文档,我建议您只需将所需的部分复制并粘贴到所需标记中的准系统文档中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM