Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
September 04, 2025 - @737.03 (what is this?)
Activity rating: Four Stars Posts & Arts: 58/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :skull: Websites are like whispers in the night  :skull: Super News: Upload a banner! (or else!)

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  automatic html text converter?


« previous next »
Pages: [1] Print
Author Topic: automatic html text converter?  (Read 586 times)
signfrog
Newbie ⚓︎
*


⛺︎ My Room

View Profile WWW

Joined 2025!
« on: July 22, 2025 @380.45 »

i write a blog, and it is getting genuinely infuriating to add code to every line. is there a program that can do this for me?

i use subheaders and all that jazz in my posts too, so preferably smth that i could change the perameters of in the settings, but honestly anything is better than what im doing right now.

thank you

:chef:
Logged
MediocreMetastasis
Full Member ⚓︎
***


Personal Text

⛺︎ My Room
Itch.io: My Games

View Profile WWWArt

Joined 2025!
« Reply #1 on: July 22, 2025 @454.68 »

Not sure if this will help at all but I did make a text to HTML convertor but it isn't good  and I'm planning on implementing more features (images, links).
Example of the pre converted text
text to html convertor
You can add another case to the switch statement such as H2 or H3 and copy code from the other cases.


EDIT here's function that loads a blog page template and inserts the converted text.

Spoiler
Code
function LoadBlogContent(path) {
    fetch(path)
        .then(r=>r.text())
        .then(text => {
        data = convert(text);
    });
    var xhr= new XMLHttpRequest();
    xhr.open('GET', 'BlogContent.html', true);
    xhr.onreadystatechange= function() {
        if (this.readyState!==4) return;
        if (this.status!==200) return; // or whatever error handling you want
            document.body.innerHTML = this.responseText;
            document.getElementById("PostTitle").innerHTML = data["title"];
            document.getElementById("PostContent").innerHTML = data["innerHTML"];
    };
    xhr.send();
}
[close]
« Last Edit: July 22, 2025 @458.44 by MediocreMetastasis » Logged

invader_gvim
Sr. Member ⚓︎
****


Don't scream for help. Fight together!

⛺︎ My Room

View Profile WWWArt

Sent On Earth By The Almighty TallestJoined 2024!
« Reply #2 on: July 22, 2025 @548.50 »

Here's how I did it on my site. You can use <div> and some css to just put all the text inside of a box and that can have any formatting you want including none. Bellow is the pastebin which will let you look at the source code to do it, but you can also just go to one of my pages and look at source. :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport: :transport:



Here is the page.

I forget who taught me how to do this. I think that maybe I had read a post from Paprika explaining how to do it, but it might have been the other cool person with a Neptune profile pic.  :happy:
« Last Edit: July 22, 2025 @554.78 by invader_gvim » Logged

Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

View Profile WWWArt

Emergency feel-good teaa silly heart 4 melon :)Ozwomp wants to know your locationHyperactive DonutGreat Posts PacmanOfficially Dog
« Reply #3 on: July 22, 2025 @594.69 »

One very overlooked option is that you can just write your blog pages in Microsoft Word (Possibly LibreOffice too?) and save them as HTML pages ^^ It lets you do all the formatting, image and style options (including links) as a word document, and you don't have to do any code work.

If you wanna add in custom styles you can setup a CSS file that you just paste into the exported html before you publish it.

It's a feature that's been in Word for decades, so even if you don't have access to modern Word, you can grab an older copy from Archive.org and it'll work just fine  :wizard:
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
MediocreMetastasis
Full Member ⚓︎
***


Personal Text

⛺︎ My Room
Itch.io: My Games

View Profile WWWArt

Joined 2025!
« Reply #4 on: July 24, 2025 @573.59 »

just write your blog pages in Microsoft Word (Possibly LibreOffice too?) and save them as HTML pages
That's actually pretty cool. I might remember that for later.
Logged

Blue
Full Member ⚓︎
***


⛺︎ My Room
StatusCafe: overmore
iMood: overmore
Matrix: Chat!
Itch.io: My Games

View Profile WWW

Joined 2025!
« Reply #5 on: July 26, 2025 @562.67 »

Would like to add to all of this, ellipsus, a writing program that I use, allows you to copy everything in HTML. It's also a good writing program overall, so I'd recommend it in general, but it has also been a lot of help for writing my site writing comprated to before.
Logged


Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi