I am using Libre Office on a Live CD for a Linux distro, it is Libre Office Version 4.2.3.3. In this case it doesn’t even have separate Writer & sWriter components, it just handles it as Writer/Web in the Live Disk version. But I think I and many others would like to know how to stop this annoying behavior for HTML documents.
When you save an HTML document with writer, it saves it with all this (for my purposes) useless data that I don’t want in there - I want a clean HTML document, that I will do my own formatting of. I tried to save it as a plain text document with the HTML file extension, didn’t work.
The stuff I am talking about is in the header section of the document, meta-data I would guess you would call it, and it automatically puts in formatting for body, and automatically puts everything in as a paragraph. I do not want that in my HTML document. I have a little ‘template’ that I will paste in as my source for the HTML document. I will put in my own paragraph tags, DIV tags, and any other tags I want in there.
It also deletes out code that is vital for what I am wanting to do. There is no good outlining software for Linux (single pane, expandable/collapseable elements, etc.) and none like this that I can find for Windows either. I don’t want to use mind mapping software or a text editor with code folding or anything like that as a substitute. Writer lets you outline, but it doesn’t hide the text (I know you can hide the text, by making a field or some such rubbish and then jumping through 10’s of flaming hoops and such, and then when you’re done you can only hide/unhide that text all at once) so when you are doing a long outline — Writer becomes totally unusable for this. You can end up with an outline in Writer that is like 50 pages long because all text is exposed at all times in Writer, and it can be done in just a couple/few pages in another Word Processor that shall remain nameless (I’m 50 years old and don’t have the time to listen to all the childish m$ rubbish, flame wars, etc) – because you can collapse/expand the text blocks, headers, etc in that WP.
There is a ‘bug’ discussion about adding proper outlining for both OOo (did I get that right? the Open Office suite) but it’s like 20 years old - and the most commented on & reported bug/feature request of all of them at the Open Office bug reporting site. And there was a short ‘bug’ discussion about adding proper outlining to Writer in the Libre Office bug reporting site or the Wiki, but it is fairly old too, and didn’t get many comments. So, one can deduce from this that the coders are never going to get around to it – or they would have 20 years ago, as the aforementioned Word Processor that shall remain nameless has had it since it’s earliest days - since writers consider it so vital to the writing process that this is a make/break matter for them, and the writers of this other to remain unnamed Word Processor want the customers/users, not to tell the users what they do/don’t need. Read the bug reports/wiki post if you are interested in why it is so important to writers.
So, I had a kinda sorta workaround for this. With a lot of research on the Internet, I found JavaScript code and some HTML code that can be used to hide/unhide text in an HTML document. Yes, without CSS sheets attached (although this might make it easier, do it once and it’s done), with just a little block of JavaScript and using some HTML coding!
Works FABULOUSLY when you do it in a text editor. Somehow, Writer breaks the functionality and it won’t work at all when done using Writer HTML format (why did Writer NEED it’s own HTML format anyway? hmm). I would have to test it again, but I think writer html format actually strips this code out of the HTML document before saving it.
If you put the following code into a clean plain HTML document, you can hide/unhide text with a mouse click, yes that’s right one single mouse click!
JavaScript code :
<script type="text/javascript">
function toggleShowHide(elementId) {
var element = document.getElementById(elementId);
if (element) {
if (element.style.display == “none”)
element.style.display = “inline”;
else
element.style.display = “none”;
}
}
It didn’t render the JavaScript code right, I can send it to someone who knows how to put it into a post and get it to work if they would like.
HTML code for the parent element, like say “Chapter 1”
<p onClick="toggleShowHide('hiddenText') "color:#000033">+ What will we discuss today? (Click me.)</p>
HTML code for hidden text, say a DIV :
<div id="hiddenText" style="display:none">The trick to include a drop down text in your web page.</div>
So, what I need to do is this.
- Stop Writer from putting in that code that I do not want in my HTML document
- Stop Writer from stripping out MY code when I enter it.
- Stop Writer from doing these things every time I save/edit the HTML document
Is this possible? If so, how?
Thank you