Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
What you propose would be ideal, but a part of what we have is based on the control we use for showing snippets within Realm Works. This control is an RTF control that happens to support HTML import and export. What we store is pretty close to what we get out of that control and probably more closely mimics RTF as translated to HTML rather than fully hand-craft HTML.
We actually do not depend on any indication of links being stored in the HTML. It is all pulled out and stored separately within the link data itself. So if you wanted to recreate links as we have inside of Realm Works, you would need to use the information in links as well as the HTML contents to properly set it all up.
So I asked (via bug report because I thought it was) about some of the XML that is kind of pointless/ugly/annoying, and got a nice developer response.
My issue was with a text snippet with links in it. (You might have seen my suggestion post as well).
In the following example, "AMC", "Aldolore Station" and "Rone Varan" are links within the sentence.
"The Aldolore Mining Cartel, also known as the AMC, is a corporation that controls Aldolore Station, Rone Varan and the surrounding asteroid fields."
The XML is:
<contents>
<p class=\"RWDefault\">
<span class=\"RWSnippet\">The Aldolore Mining Cartel, also known as the </span>
<span class=\"RWSnippet\">AMC</span>
<span class=\"RWSnippet\">, is a corporation that controls </span>
<span class=\"RWSnippet\">Aldolore Station</span>
<span class=\"RWSnippet\">, </span>
<span class=\"RWSnippet\">Rone Varan</span>
<span class=\"RWSnippet\">and the surrounding asteroid fields.
</span>
</p>
</contents>
That means that if I want to use CSS to pretty up my snippets, my only option is to use the larger RWDEFAULT class rather than just the RWSnippet class that's immeidately around the text. If I use the RWSnippet class and do any positioning or margins, it will mess up individual words in the line.
Depending on how RWSnippet is used in other use-cases (I just have really simple images-and-text realms) it might be worth your while to simply filter out the RWSnippet spans, because they do little but add a lot of extra characters to the text (nearly doubling the size in this example).
There doesn't seem to be a way that they can change the class of links to a different class to denote a link, according to David, the dev who replied in pretty cool detail to my question.
I use the P tag. I strip out some inline formatting first, though. It seems to work. Are you having issues?
One thing that might help is specifying a DOCTYPE. The sample outputs I've seen don't have one, leaving the browsers to make more guesses about how to display your HTML+CSS. (It's called "rendering in Quirks Mode" if you want more info.)In regards to tables and lists, there could be a few different things going on here. I've noticed that between IE, Chrome and Firefox, there are notable differences between how tables are displayed.
<!DOCTYPE html>
The style attribute does override earlier styling, but only for the things specified within. Anything not included in the style attribute will be determined by whatever other rules exist. The rules in your external CSS file will only have no effect if the style attribute overrides everything within those rules.My understanding is that inline formatting overrides external CSS files, so if you preserve formatting, the table formatting in the CSS file should have ... no ... effect? (Famous last words, right?)
Looking at the part of tmilktoast's sample where there's a list, the surrounding <p> elements' style attributes have a margin-left but the <ul> does not. HTML lists should be treated the same as paragraphs and tables for most styling purposes.The lists are what have me most confused, at least in the aspect that lists are much simpler than tables, so their behavior should be more straightforward.
One thing that might help is specifying a DOCTYPE. The sample outputs I've seen don't have one, leaving the browsers to make more guesses about how to display your HTML+CSS. (It's called "rendering in Quirks Mode" if you want more info.)
The DOCTYPE needs to be the first line of your HTML file. The one for HTML 5 is pretty simple:
Adding that won't make the different browsers (and versions of browsers) create identical output, but they should end up a lot closer than before.Code:<!DOCTYPE html>
The style attribute does override earlier styling, but only for the things specified within. Anything not included in the style attribute will be determined by whatever other rules exist. The rules in your external CSS file will only have no effect if the style attribute overrides everything within those rules.
Looking at the part of tmilktoast's sample where there's a list, the surrounding <p> elements' style attributes have a margin-left but the <ul> does not. HTML lists should be treated the same as paragraphs and tables for most styling purposes.
FWIW, I think you'd be better off putting a <div> around the things you want to indent and adding padding or margin to the <div>. (I threw a quick example up at JSBin.)
<ul style="margin-left:105px;" start="1" style="margin-top:0;margin-bottom:0;">
The thing that confuses me is that in my own testing, there IS a margin-left in the UL tag. My lists, ordered and unordered, are properly indented along their respective topics and sections.
One thing I noticed though, is that my UL tags have two style declarations.
Code:<ul style="margin-left:105px;" start="1" style="margin-top:0;margin-bottom:0;">
I fixed this in other parts of the code to incorporate everything into one style declaration. I missed doing that for lists.
I'm wondering if maybe in the process of uploading his html file, something in that process detected the two style statements, determined that as invalid, and deleted one of them?
Or maybe he manually edited something? I have no idea. I don't understand why I would have the margin-left statements in my output, and he wouldn't.
One thing that might help is specifying a DOCTYPE. The sample outputs I've seen don't have one, leaving the browsers to make more guesses about how to display your HTML+CSS. (It's called "rendering in Quirks Mode" if you want more info.)
The DOCTYPE needs to be the first line of your HTML file. The one for HTML 5 is pretty simple:
Adding that won't make the different browsers (and versions of browsers) create identical output, but they should end up a lot closer than before.Code:<!DOCTYPE html>
The style attribute does override earlier styling, but only for the things specified within. Anything not included in the style attribute will be determined by whatever other rules exist. The rules in your external CSS file will only have no effect if the style attribute overrides everything within those rules.
Looking at the part of tmilktoast's sample where there's a list, the surrounding <p> elements' style attributes have a margin-left but the <ul> does not. HTML lists should be treated the same as paragraphs and tables for most styling purposes.
FWIW, I think you'd be better off putting a <div> around the things you want to indent and adding padding or margin to the <div>. (I threw a quick example up at JSBin.)
Regarding those Edge of the Empire fonts, I imagine none of you are seeing them in your browser because you probably don't have them installed on your PC.
EightBitz, do you still want me to send you those things you asked for, or were you just going to work on Parody's suggestions?