Journal Manipulation

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.
User avatar
J'Kla
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
MOULa KI#: 0
Location: Geordieland UK

Journal Manipulation

Post by J'Kla »

I am in the process of writing an Noobs guide to age building and I am in the process of doing a section on Journals

I have sorted the import of a book cover image and the command to get it to appear in the right place with

<cover src=”BookCover.hsm”>

after importing the image to the appropriate image library.

I have font, font size and font color sorted with the command

<font size=18 face=Tahoma color=000000>

Is there a command I can add to this to justify the text.

I have also managed to use the image library to insert an image into the body of the text with the command

<img src="WaterCarrier.hsm">

Is there some way to adjust this command to center the image horizontally or have any control over its position Found align=center for image going to try same with text. I have noticed that the image appears squashed horizontally.More forum surfing has revealed resize=no

Yet more forum surfing and I have found <p align=center> and experimentation has revealed <p align=left>

Is there any specific documentation for this?

It is clear the image pushes the text onward.

Any help would be appreciated.
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Re: Journal Manipulation

Post by Sirius »

J'Kla wrote:Is there a command I can add to this to justify the text.
Probably. This is untested, but in regular HTML, the <p> tag supports justification like so:

Code: Select all

<p align="justify"> 
Plasma uses a subset of true HTML. It's heavily limited, but a few core features of HTML are available to it.

Actually, I'm wondering how many HTML tags Plasma supports... It would be interesting to document it somewhere. Not like I expect CSS, Javascript and Canvas to be available but still.
J'Kla wrote:It is clear the image pushes the text onward.
You're looking into having the text flow around the image ? I'm afraid I don't know how to do that, sorry :(
User avatar
Chacal
Posts: 2515
Joined: Tue Nov 06, 2007 2:45 pm
MOULa KI#: 0
Location: Quebec, Canada

Re: Journal Manipulation

Post by Chacal »

Sirius wrote: Actually, I'm wondering how many HTML tags Plasma supports... It would be interesting to document it somewhere. Not like I expect CSS, Javascript and Canvas to be available but still.
Next thing you know, someone rewrites Facebook in Python and it renders in a journal.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Deledrius
Gehn Shard Admin
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm
MOULa KI#: 23298

Re: Journal Manipulation

Post by Deledrius »

Sirius wrote:Not like I expect CSS, Javascript and Canvas to be available but still.
Especially not in an HTML subset written well before 2004!
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Re: Journal Manipulation

Post by Sirius »

Chacal wrote:Next thing you know, someone rewrites Facebook in Python and it renders in a journal.
Well, technically you *could* embed Chromium into Plasma and have it render to a texture which you then apply to a mesh. But that would be a bit overkill :)
Facebook would be really interested in being able to spy on users' habits though.
User avatar
J'Kla
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
MOULa KI#: 0
Location: Geordieland UK

Re: Journal Manipulation

Post by J'Kla »

I am knocking together a list so I can do an exhaustive test

Am I safe ignoring all of the HTML5 stuff?
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Re: Journal Manipulation

Post by Sirius »

J'Kla wrote:Am I safe ignoring all of the HTML5 stuff?
Oh, definitely. HTML5 came years after Plasma.
You can also ignore all things related to Javascript and CSS - those are so complex only actual browsers use them. I expect Plasma's HTML to be very, very limited.
User avatar
Deledrius
Gehn Shard Admin
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm
MOULa KI#: 23298

Re: Journal Manipulation

Post by Deledrius »

Sirius wrote:
J'Kla wrote:Am I safe ignoring all of the HTML5 stuff?
Oh, definitely. HTML5 came years after Plasma.
You can also ignore all things related to Javascript and CSS - those are so complex only actual browsers use them. I expect Plasma's HTML to be very, very limited.
Quite limited, just basic markup. The thread I linked to last time this question was asked has the most complete information at present.
JulyForToday
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am
MOULa KI#: 0
Contact:

Re: Journal Manipulation

Post by JulyForToday »

Quick necropost here. :lol:

I did some searching through the forum. This thread being the best reference I've found regarding Plasma HTML

I was curious if anyone knew whether or not it supports either bold, italics, or underline.

Something like this doesn't work:
<font face=Courier size=14 style=bold>

A couple of the fonts that come with Uru have bold/italic variations, although they have spaces in their file names. You have to wrap them in quotation marks to keep them from breaking the rest of the tag:
<font face="Courier Bold Italic" size=14>

But it still doesn't produce anything other than the normal style of font. Not sure if this is something Plasma actually supports, or if I'm wasting my time trying.
I also can't recall any use of that kind of formatting in journals from the game.
User avatar
Sirius
Posts: 1508
Joined: Mon Jul 26, 2010 4:46 am
MOULa KI#: 0
Location: France

Re: Journal Manipulation

Post by Sirius »

Try putting your text inside <b></b> (or <strong></strong>), <i></i> (or <em></em>) and <u></u>. I have never tried it, but those are very old HTML tags, I think they should work.
Post Reply

Return to “Plasma Development”