Skip to content

0r4nd/BBCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBCode parsing library

Implementation status

tags:

  • tag [size] ✅
  • tag [font] ✅
  • tag [color] ✅
  • tag [b] ✅
  • tag [i] ✅
  • tag [u] ✅
  • tag [o] ✅
  • tag [s] ✅
  • tag [typing] ⭕ (buggy)

Standard tags (customisable)

tag exemple
Size [size=150%]test[/size]
[size=24px] or [size=24]
Family [font=arial]test[/font]
Color [color=red]test[/color]
Bold [b]test[/b]
Italic [i]test[/i]
Underline [u]test[/u]
Overline [o]test[/o]
Strikethrough [s]test[/s]
Typewriter [typing=0.1]test[/typing]

BBCode.html() function

Description: Basic bbcode to html

Exemple:

BBCode.html("- [font=Impact]this is 'Impact' font [/font][color=rgb(255,0,0)] red [i]italic text[/i][/color] ");

Result:

"- <span style="font-family:Impact;">this is 'Impact' font </span><span style="color:rgb(255,0,0);"> red </span><span style="font-style: italic;color:rgb(255,0,0);">italic text</span>"

BBCode.log() function

Description: Show html on the console!

Exemple:

BBCode.log("- [font=Impact]this is 'Impact' font [/font][color=rgb(255,0,0)] red [i]italic text[/i][/color] ");

BBCode.fillCanvas() function

Description: Draw bbcode on a canvas

About

BBCode parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published