HTML editor

Writer61

Literotica Guru
Joined
Feb 17, 2024
Posts
2,423
I have spent the whole afternoon editing an HTML version of a story exported from the version of Word. Even when using the Web Page Filtered option, which is supposed to exclude Word-specific stuff, the output is still riddled with unnecessary tags, some of which are incompatible with the Lit preview function. All of this so that I could use <kbd> for a few blocks of text.

Anyway, my question is what editor do you use to create HTML files? Is there something that auto-completes tags like <b> and <p>, and with a WYSIWYG view? I am particularly interested in anybody using a Mac.
 
Lit's HTML support is very poor, and I would be extremely cagey about uploading valid HTML into the system, expecting it to be rendered correctly. I've seen too many examples of Lit quietly digesting and discarding markup with no warning.

The best WYSIWYG system for HTML is a browser. Load the text, check that it's doing what you expect it to. Edit. Rinse, repeat.
 
Lit's HTML support is very poor, and I would be extremely cagey about uploading valid HTML into the system, expecting it to be rendered correctly. I've seen too many examples of Lit quietly digesting and discarding markup with no warning.
I am aware of the limited support for HTML and the reputation of tags being lost.

What I would really like to know is what editors those who prefer to write HTML use.
 
I look at the reviews here of very complicated programs that drip with features like a Christmas tree, and I think wow, why?? Make it as simple as possible. I write plain text (in WordPad, but I'm prepared to drop down to NotePad) and just type the <b> and &mdash; myself. My notes to myself are in that file (at early stages) or a different file. I have a Python program that I run over it to check the paired tags match, and that there are no unknown <x> or &xyz; tags I didn't personally authorize. This whole process just seems so much easier than hoping a very complicated program with a complicated format is going to be reducible to the simple HTML this site reliably accepts.
 
I am aware of the limited support for HTML and the reputation of tags being lost.

What I would really like to know is what editors those who prefer to write HTML use.
I write HTML, but I use Lyx, which is neither an HTML editor nor a WYSIWYG editor.

But then, I am odd.
 
Lit uses a small subset of html, and I use even less than that because there have historically been problems getting it rendered consistently. The tags I need, I insert with my word processor. I use search-and-replace to change multi-character punctuation marks (mostly m dash and horizontal ellipse) to their corresponding html entities. That replacement is only needed to keep Lit from changing the punctuation to the ascii equivalents.

To check it (and as a late editing phase) I export that to a plain text file, replace pairs of newlines with paragraph breaks, and view it in a browser, using a header that formats it so it looks like it will look in Lit, but without page breaks.
 
I usually just use search and replace to add markup, but I rarely use anything other than italics and bold.
 
I use search-and-replace to change multi-character punctuation marks (mostly m dash and horizontal ellipse) to their corresponding html entities.
Do you do that manually, or with a script of some kind?
 
Last edited:
Do you do that manually, or with a VB script?
Search and replace in LibreOffice.

It seems to me like you should be able to find a browser extension that would let you edit html and view it as you work. I checked for Firefox and such things do exist, but they have few users or reviews.
 
Good question. In Word, the only way is with a VB Script.
I found out how to do that in LibreOffice Writer. You open the find and replace dialog, leave the "find" field blank, select the "Format" button and choose "bold" or "italic." Then Find, Find Next, etc.

That works, but I haven't tried replacement yet.
 
Good question. In Word, the only way is with a VB Script.
Search and replace for styles in LibreOffice.

Under Options, enable regular expressions.

Enter .+ in the "find" field. This matches any text.

Select the "Format..." button and choose the style (italic, for instance)

Enter the replace string. Use an ampersand to match the found text.

To find all italic text and tag it with HTML, you would place .+ in the Find field and <em>&</em> in the Replace field, then select Replace All.
 
I use Ghostwriter, which is technically a Markdown editor, but because Markdown includes the possibility of adding raw HTML, the editor highlights and autocloses HTML tags as well.

In general, any decent Markdown editor should be doing the same.
 
Writing HTML by hand is a quick path to insanity. Please use a tool. For Lit stories, if you only use basics like italics and boldface and maybe underline, this simple page will convert a Word doc into simple HTML ready to paste into the Lit submission box:

https://www.textfixer.com/html/convert-word-to-html.php

The above runs in the web browser... your story is not uploaded to any server to be stolen or reported to the smut police. Also, it only works on .docx files, so if you use LibreOffice, save a copy in .docx format ("Word 2010-365 Document (*.docx)" in the Save as dialog box in LibreOffice) and upload that.

If you have an installable copy of MS Word (not the office.com web-based version) and are somewhat technical, give my Word to Simple HTML macro a try:

https://syleussnow.wordpress.com/2022/01/21/ms-word-to-html-for-literotica/

It converts more stuff than the textfixer site: Italics, bold and underline, em and en dashes, line breaks, angle brackets, ampersands and centered text (though that's still broken in Literotica, apparently)

Edit: I've got a version for LibreOffice now too: LibreOffice to HTML converter for Literotica authors
 
Last edited:
If you have an installable copy of MS Word (not the office.com web-based version) and are somewhat technical, give my Word to Simple HTML macro a try:

https://syleussnow.wordpress.com/2022/01/21/ms-word-to-html-for-literotica/

It converts more stuff than the textfixer site: Italics, bold and underline, em and en dashes, line breaks, angle brackets, ampersands and centered text (though that's still broken in Literotica, apparently)
Thanks, I will give it a try.
 
I have spent the whole afternoon editing an HTML version of a story exported from the version of Word. Even when using the Web Page Filtered option, which is supposed to exclude Word-specific stuff, the output is still riddled with unnecessary tags, some of which are incompatible with the Lit preview function. All of this so that I could use <kbd> for a few blocks of text.

Anyway, my question is what editor do you use to create HTML files? Is there something that auto-completes tags like <b> and <p>, and with a WYSIWYG view? I am particularly interested in anybody using a Mac.
I write my stories with mark-up in Google Documents. In around 150 stories I can count the number of issues I’ve had on one hand. And two of those were not realizing you needed to close tags at the end of each paragraph. I never made that mistake again.

Am I missing something?



Example:

IMG_4045.jpeg
 
Am I missing something?
Not compared to my original question.

What I would miss, perhaps even in Google Docs, is an established workflow in which I use specific styles & colours to help me refine the document. When they have all gone, the story is ready for proofreading.

@SyleusSnow's macro (above) fits in nicely.
 
Last edited:
I have spent the whole afternoon editing an HTML version of a story exported from the version of Word. Even when using the Web Page Filtered option, which is supposed to exclude Word-specific stuff, the output is still riddled with unnecessary tags, some of which are incompatible with the Lit preview function. All of this so that I could use <kbd> for a few blocks of text.

Anyway, my question is what editor do you use to create HTML files? Is there something that auto-completes tags like <b> and <p>, and with a WYSIWYG view? I am particularly interested in anybody using a Mac.
I use Scrivener to write my stories using HTML tags:
1785349674864.png

I don't do a lot of HTML tags, so it's easy. But you could do the same thing in any text editor.

The challenge is previewing the story. I use a stub HTML document:
Code:
<html><head><title>Story Formatting Test</title></head><body text="#000000" vlink="#0000FF" alink="#FC0000"><font size="2" face="Verdana,Arial,Helvetica, sans-serif">
[Put story here]            
</body></html>

The problem is converting the pasted text into something that is HTML-compatible. In particular, replacing new lines with <p></p> tags. I have very clunky way of doing it.
Code:
<html><head><title>Story Formatting Test</title></head><body text="#000000" vlink="#0000FF" alink="#FC0000"><font size="2" face="Verdana,Arial,Helvetica, sans-serif">
<p><i>I published this story on 6/29/19. The interesting part of writing this story was imagining what it’d be like to be a full-time author who was not a big name. You don’t make a lot of money selling books, so I came up with all these different ways the father could make money as an author beyond selling books. Also, I love Disney World and really enjoyed using it as a major setting.</i></p>
<p></p>
<p><i>I took this and all my other stories down in January 2023. I've done some cleanup before republishing it.</I></p>
<p></p>
 
What version of Word are you using that can't do a find for italics? My 2021 version does.

Click the dropdown next to Find. Select advanced find. Click the format dropdown on advanced find. Select Font. The font window should come up. Select the italic checkbox, and then hit find next.
 
What version of Word are you using that can't do a find for italics? My 2021 version does.

Click the dropdown next to Find. Select advanced find. Click the format dropdown on advanced find. Select Font. The font window should come up. Select the italic checkbox, and then hit find next.
Advanced Find is not an option in Word 16 for Mac. These are the formatting options you can earch for:

Screenshot 2026-07-29 at 22.28.24.png
 
Back
Top