DOMy icon indicating copy to clipboard operation
DOMy copied to clipboard

Hypertext

Open karai17 opened this issue 10 years ago • 16 comments

How are we going to pull off hypertext? The ability to use multiple colours, fonts, throw in some emoji, etc in a single line or paragraph of text is probably going to be important, especially for online games with chat boxes.

karai17 avatar Jan 13 '15 20:01 karai17

that makes it totally useless for the chat box case.

shakesoda avatar Jan 14 '15 04:01 shakesoda

I think the most obvious route would be to create an inline container for a bunch of data. Would that be ideal, though?

{ "inline",
    { "text", "This is a chat message and it contains an ", class="white" },
    { "text", "Item Link", class={ "common_item", "item_link" } },
    { "text", ".", class="white" }
}

karai17 avatar Jan 14 '15 04:01 karai17

End user hypertext is also important, as brought up in IRC.

> Hello, my name is {red}Karai{red} and I am totally {b}{i}AWESOME{i}{b}!     [ Send ]

karai17 avatar Jan 14 '15 04:01 karai17

Some end user codes could be as follows:

{red}, {green}, {blue}, {cyan}, {pink}, {yellow}, {purple}, etc -- named color codes
{#12345678}, { 255, 255, 255, 255 } -- hex/dec color codes
{b}, {i}, {s} -- formatting codes such as bold, italics, strike through.
{url} -- external websites

karai17 avatar Jan 14 '15 05:01 karai17

Aren't there libraries for that? Also why can't you support it by default for all text?

adrix89 avatar Jan 14 '15 08:01 adrix89

I do want to support all text, that is why I opened this issue... If you have an idea that will help, feel free to comment.

karai17 avatar Jan 14 '15 19:01 karai17

Emojis should be added lol. If emojis are added I think it should be done the same way android and iphone does them. For example on PC a train emoji is just typing out the :train: short code.

Bobbyjoness avatar May 02 '15 13:05 Bobbyjoness

Oops the train short code is : train :

Bobbyjoness avatar May 02 '15 13:05 Bobbyjoness

But with out spaces

Bobbyjoness avatar May 02 '15 13:05 Bobbyjoness

Emoji are a unicode standard so if DOMy ever does support them, it would use the standard unicode glyphs.

karai17 avatar May 02 '15 13:05 karai17

Does Unicode standards have all the ones from my android keyboard?

Bobbyjoness avatar May 02 '15 13:05 Bobbyjoness

Google's emoji specifically use the unicode standards, yes.


Landon Manning [email protected]

On 2 May 2015 at 10:55, Bobbyjoness [email protected] wrote:

Does Unicode standards have all the ones from my android keyboard?

— Reply to this email directly or view it on GitHub https://github.com/excessive/DOMy/issues/14#issuecomment-98361178.

karai17 avatar May 02 '15 13:05 karai17

Emoji totally depends on Love getting font fallbacks or you using a font that has the glyphs, it'll just work if you have a font that can do it.

shakesoda avatar May 02 '15 14:05 shakesoda

While native emoji will work, rendering cute graphics instead of glyphs would be much more difficult.


Landon Manning [email protected]

On 2 May 2015 at 11:30, Colby Klein [email protected] wrote:

Emoji totally depends on Love getting font fallbacks or you using a font that has the glyphs, it'll just work if you have a font that can do it.

— Reply to this email directly or view it on GitHub https://github.com/excessive/DOMy/issues/14#issuecomment-98365280.

karai17 avatar May 02 '15 14:05 karai17

I wouldn't define a hypertext markup language, your Lua syntax is one already. An inline block is fine, end-user end points are wrong IMO, their use is very very application specific and might cause security risks and inconvenience in some applicstions. Also there is no reason to introduce a new layer.

Your new syntax is essentially a markup language that could be compiled into regular DOMy. That could be a seperate, optional and very configurable library or module.

s-ol avatar May 02 '15 16:05 s-ol