jarrett / rbbcode

Converts BBCode to HTML. Gracefully handles invalid input. Built on Treetop.
41 stars 9 forks source link

Feature request: Smilieys #9

Closed iGEL closed 12 years ago

iGEL commented 14 years ago

I haven't tried rbbcode yet, but from reading the docs, it doesn't look like you do support smiley codes like :-) or :rolleyes: to be rendered into a graphical smiley. Strictly spoken, they aren't a part of bbcode, usually you want to have both. Any plans about this? Or is it already possible?

jarrett commented 14 years ago

While it's not supported out of the box, it should be possible to add smiley support. See "Customizing" in the README.

lawitschka commented 13 years ago

It is possible, indeed, but using tags like [smileyLOL][/smileyLOL] is not that nice from a usuability point of view. That's why i forked the repository and started supporting tags which do not have to be closed. Any tagname starting with a colon, e.g. [:smileyLOL], will be interpreted as such a leaf tag.

I used jquery.bbedit for BBCode creation (http://www.w3theme.com/jquery-bbedit/) which works with this syntax for smileys. Works like a charm in a RoR project of mine :)

If you need an example implementation, just let me know. You can find my repository under https://github.com/lawitschka/rbbcode

jarrett commented 13 years ago

Looks good! I'm curious as to why you used the term "leave tag."

Maintenance on this gem proceeds at a snail's pace I'm afraid, so I don't know when I'll get around to incorporating this stuff. I take it you're able to move ahead with your own fork of the gem, yes?

lawitschka commented 13 years ago

The term "leave tag" was a bad spelling error... "leaf" was meant, actually, as used in tree theory describing nodes without any child nodes. ;)

Yes, i am able to go ahead, but i'm not quite sure whether i'm going to have the time to do so. Basically this improvement was the only thing i needed to use this gem in my project. I will try to improve it and do some bug fixing, nevertheless.

jarrett commented 13 years ago

Oh ok. That makes sense. I'll see if I get a chance to work this into the main gem.

jarrett commented 12 years ago

A new version based on Treetop will be coming out soon. This is a total rewrite, so all current issues will be closed. The new version will support smileys.