Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Am I doing this right?

5 years ago

I've been testing out different things I need for a storygame I'm working on. One thing I can't get to work, however is background images, so let me know if I'm doing this right:

I'm using Advanced Editor, I click on the 'source' tab, and type in: <body background="picture url"> then I make sure it's saved.

But then it disappears when I go back to look at, and nothing is showing up in the background when I preview it.

Am I doing this right?

5 years ago

Try saving it, but then don't try to go back to look at it, instead go preview it right away.

I can't check if your html is correct, but I can tell you that the RTE (Rich Text Editor) doesn't like images, and will delete them when it opens up 'source' code. This is one of the many reasons people recommend turning it off. Anyway, I suggested the above (of saving and going straight to preview) because I believe that was a workaround, because RTE cannot delete the tag if it never opens the page again.

This can be a bit bothersome if you want to edit, but you can always add it in again (assuming it works in the first place). Oh, this is all assuming you are using the RTE and thus want to keep it, but keep in mind that it isn't too hard to learn the html needed to do everything it can do, so turning it off may be the better option, but it us up to you.

Am I doing this right?

5 years ago

Even going straight to preview doesn't seem to let it work. So in that case...

How do I turn off RTE and how would I go about using html?

Am I doing this right?

5 years ago

My Stuff => Profile. There'll be a checkbox for RTE.

That tag thing with which you use for the image is html, the other ones I say are useful are:

  • <p>Paragraph tags</p> (Only necessary if you don't make paragraphs in another way, but I think they aren't needed if you've got no other tags either).
  • <b>Bold</b> Can use 'strong' (no quotes) instead of b. I think I heard that was the standard, but both work.
  • <i>Italics</i> Can use 'em' (no quotes) instead of i. Same as above.
  • <br> A break tag, can be used to make white space, or make it look like you pressed shift+enter.
  • <a href="link">Text that will be hyperlinked.</a> Doubtful you'll use this in a story, but this is how you embed links to stuff. You just replace link with an actual link (href means hyperlink reference, I think, and 'a' just means anchor).

You can also do all the standard things (tables, lists [like the above!]), since you can technically make webpages with this stuff. Granted, for a website, you'd want to use some CSS to make it look nice and stuff, but those above bits are the ones I find get used in story creation for the most part. Also, I haven't tested writing without paragraph tags, so they may be more unnecessary than I realize, but hey, this is my biased response so I'm mentioning them.

Anyway, if you are one of them people who like to chance color of font, you can always google it (this goes for anything else), but generally you just add... attributes? idk, but here is the color one as an example:

<p style="color:red">Red</p>

Notice that a lot of tags have one part which starts the thing, then one which closes it. Anyway, for color, you can also put in hex values (like color:FFFFFF [this being white]). I think it was hex, but regardless of the name, it lets you be able to get the exact color you are looking for. Alternatively just use this website which lists names of html supported colors. (Here is one where you can find any supported color).

Oh, I guess it is worth mentioning that certain characters get read as html, so if you don't want that, you want to type them out in an alternative form, but if you run into this issue, it is easy enough to google the character representation.

P.S. For accessibility reason, I'll mention that it is a good idea to not have hyperlinks 'text' (the clickable part) be too short, since you don't want it to be hard to click. Also, when you have images, it is a good idea to add alt text, so that if it doesn't manage to load the image, people will still know what it was meant to be (also if someone is using a screen reader, I believe it reads the alt text). Do this just by adding 'alt=':

<img src="image path/link/whatever" alt="alternative text describing image">

P.P.S. You can also change text size, font, etc. with html, but I think I've rambled enough, lol. Tell me if you get the background image working!

Edit Welp this looks a bit worse than I was hoping for. Anyway, one more thing, if you right click, then press inspect, you'll open a thing with which shows you a page's html (and other stuff too)! You can also view source, but then you don't get a side by side. Granted, I doubt you'll be doing anything as complicated for a storygame, so don't worry about it, just thought it was a fun little thing.

Am I doing this right?

5 years ago
I've tried using both of your advice, and I've also tried looking around on the internet on how to do it, but I still can't get it to work. Maybe I'm just an idiot, hah.

Am I doing this right?

5 years ago
To turn off the Rich Text Editor just uncheck the box in your profile, and then just copy and paste the thing Brad posted into a global script. Zake likes words a whole lot which is good for critiques but if you don't know scripting things that post is terrifying.

Am I doing this right?

5 years ago
Yes, that's what I'm saying. I've turned off RTE, I've copy pasted what Brad posted, nothing is working. I'm still not sure what I'm doing wrong.

Am I doing this right?

5 years ago
Aha! I don't know what I did differently, but now it's working! Thank you guys for your help.

Am I doing this right?

5 years ago

If you're going to change the background image, I'd strongly suggest using a <style> tag instead. It's much more "valid" and customizable than <body background> (the old, now deprecated way of doing it).

Also, you can put this HTML in a page script to keep the clutter off the page (or use HTML in tandem with the RTE if that's really your jam), or the global page script to apply it to all pages:

$PAGETEXT := "<style>
body {
  background-image: url('picture url');
}
</style>" + $PAGETEXT