Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Automatic Deletions in RTE / Alt Text

4 years ago

Question Regarding Formatting Issues 

I prefer using the RTE to format my stories, because it allows me to organize my thoughts better (and more easily implement text effects). However, I'm aware its a known bug that the RTE will interfere with some elements of coding, image positioning, etc. 

My concern is that in chapter three of my story, I have a lot of on page variable tricks and images.

For example:

a) Any images which are on their own line are centred (established using the HTML in the source code). 

b) Any images which are in-line with the text have white borders around them, causing them to not press right up against the text. Since CYS only allows you to implement black borders, I coded this into the HTML in the source code. 

c) Text which is designed to appear only when certain variable conditions are met (using on-page variable tricks) has a code in the HTML source telling it to insert line breaks. I can't simply enter this onto its own line in the RTE, because it will cause a paragraph break when the variable condition is not met. 

 

All of these changes work just fine when I code them using HTML in the source. The problem is, if I make any later revisions to the page and save it, all of these changes are automatically deleted. This is a nightmare when it comes to revising my story, because if I want to fix one typo on a page, I need to take 10 minutes to re-edit the HTML source code before saving. 

I was wondering if anyone has any possible solutions to this. I would prefer one that does not involve disabling the RTE. (I'm not sure this would even fix the problem, since I've tried disabling the RTE before, and a lot of my HTML in the source was still deleted.) 

 

Question Regarding Alt Text 

Since my game makes heavy use of graphics, I wanted to provide alt text for images that are essential to the plot of the story (e.g. solving puzzles, or explaining important concepts.) This would ensure my game is still playable, if someone was unable to view the images or if the links ever changed. I started to implement this for one of the two interactive books in my game. By 'interactive book', I mean you are directed to a table of contents where you can view one of four pages. The pages themselves are pictures that I created digitally. 

So I was implementing this into the source code. Then I discovered that the alt text seems to be unable to accept HTML, which means I couldn't insert line breaks. After doing a quick google search, I discovered that this is a characteristic of alt text in general, not just the website. Considering that some of the 'pages' in this book are poems / riddles that make purposeful use of line breaks, or encycopedia entries with multiple paragraphs, I am concerned by this issue. I was wondering if there is any way to fix this - perhaps by manipulating the page scripts in some way? I am not extremely familiar with CSS. 

 

Thank-you very much to anyone that is able to help!

@BradinDvorak @Ogre11 @Killa_Robot

Automatic Deletions in RTE / Alt Text

4 years ago
I know this was a bug with the old RTE, so I'm assuming its just a bug with the newer one as well. I don't know of a way that doesn't involve disabling RTE (I disabled it long ago).

A and B sound like they could be added to pagetext, since they are just HTML rules added. C sounds like it would be trouble, unless the text is at the beginning or end of the page (then you could just use pagetext).

Only other thing I could think of is create your own backup text files, and then just copy and paste those in place when you're wanting to make changes. Maybe the others know another way.

Automatic Deletions in RTE / Alt Text

4 years ago

Thanks, Killa. I've done this for the pages with the most coding (like with my interactive keyboards), but its a pain when I want to go back and edit considering I have these sort of variables on dozens of pages.

This problem did not occur for you when you disabled the RTE? I think I disabled it before and was still experiencing the same problem. I'm also concerned that doing so could interfere with the current coding.  

Automatic Deletions in RTE / Alt Text

4 years ago
No, I'm pretty sure it's just the RTE which removes HTML. Probably because it generates the HTML based off of the rich text code, so it's probably overwriting everything whenever you load it to edit it.

Just a guess on who it works though.

Automatic Deletions in RTE / Alt Text

4 years ago
You have to log out and then in again for it to properly disable itself. But then of course any pages already made with the RTE will still contain all the unnecessary gibberish it inserted, so that may still create issues of its own having to deal with that mess when going back to edit.

I have never ever seen anyone attempt a game as complex as yours with the RTE active, as it tends to screw up so many necessary things, besides being ugly af and actively painful to use with dark mode.

Anyway, I thought images getting eaten was a bug 3J said he fixed, but apparently not.

Automatic Deletions in RTE / Alt Text

4 years ago
Do you by chance know if doing so will cause any disruptions in my story as is, considering it's currently working well?

Edit: Caved in and turned off the RTE. It makes things a lot easier than I thought, although I suppose I'll have to go back and delete all those extra paragraph breaks now.

Automatic Deletions in RTE / Alt Text

4 years ago

Original HTML text:

Result (saved for first time):

Automatic Changes to HTML Source Text when Page is Re-Saved:

Result:

Automatic Deletions in RTE / Alt Text

4 years ago
Disable the... oh wait... Have you tried css? I would think you could use classes and adjust the formatting in a css file, leaving just the tag on the page?

Automatic Deletions in RTE / Alt Text

4 years ago

I'm not too familiar with CSS. I'd be happy to learn what's needed, but all I know of HTML and CSS was stuff I learned while creating this game. I know the basic stuff like changing fonts, and adding pictures/italics, but most of the other effects has been stuff I've gotten help for in the advanced editor forum. 

Do you know how to do this, or have any links that would offer a basic explanation? Could be useful, and I will attempt it. 

Automatic Deletions in RTE / Alt Text

4 years ago
Well, here's a site that I like for CSS, but there can be a lot there.

The reason I ask is that with css you can add a title to tags in your text, then format them in a different place. This could allow you to not have to make as many changes in your text. If you setup the tags correctly, you can change the format completely with the css.