Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer day - @359.71
Activity rating: Three Stars Posts & Arts: 49/1k.beats Random | Recent Posts | Guild Recents
News: Love is not possession  :4u: Guild Events: There are no events!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  automatic html text converter?


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


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« on: a Summer day » Embed

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
Sr. Member ⚓︎
****
View Profile WWWArt


Wishlist Skelecool: Remnants Please!!!
⛺︎ My Room
Itch.io: My Games

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #1 on: a Summer day » Embed

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: a Summer day by MediocreMetastasis » Logged


Artifact Swap: The fingerSad DoggoNeutral Doggo
invader_gvim
Sr. Member ⚓︎
****
View Profile WWWArt


Don't scream for help. Fight together!
⛺︎ My Room

Guild Memberships:
Artifacts:
Sent On Earth By The Almighty TallestJoined 2024!
« Reply #2 on: a Summer day » Embed

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: a Summer day by invader_gvim » Logged

Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


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

Guild Memberships:
Artifacts:
Bug!You're a Star!Flinstone VitaminI got robbed by Dan Q on Melonland!Always working hard!Known Apple shill
« Reply #3 on: a Summer day » Embed

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

Artifact Swap: Red TulipLurbyPlank
MediocreMetastasis
Sr. Member ⚓︎
****
View Profile WWWArt


Wishlist Skelecool: Remnants Please!!!
⛺︎ My Room
Itch.io: My Games

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #4 on: a Summer day » Embed

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


Artifact Swap: The fingerSad DoggoNeutral Doggo
Blue
Full Member ⚓︎
***
View Profile WWW


⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: overmore
iMood: overmore
Itch.io: My Games

Guild Memberships:
Artifacts:
Daydreaming My MelodyJoined 2025!
« Reply #5 on: a Summer day » Embed

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

https://files.catbox.moe/ul9xd6.pnghttps://files.catbox.moe/cep284.png
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ 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
@000 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net