You are not logged in.

kme

Intermediate

  • "kme" started this thread

Posts: 264

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

1

Saturday, March 11th 2023, 12:46am

Supported BBCode tags

Nothing fancy, but thought I would share: made a quick list of supported BBCode tags in krpano

These can be used with the Textfield like this:

Source code

1
<layer type="text" text="[b]bold[/b]">


Online example:
https://krpano.kri-soft.be/examples/bbcode/

Supported in 1.21:

Source code

1
2
3
4
5
6
7
8
9
10
11
[b]Bold[/b]
[i]Italics[/i]
[u]Underline[/u]
[sup]Superscript[/sup]
[sub]Subscript[/sub]
[s]Strikethrough[/s]
Text before the break [br] text after the break
[h1]Header 1[/h1]
[h2]Header 1[/h2]
[h3]Header 1[/h3]
[ code ]This is some code.[ /code ]


Unsupported at the moment:

Source code

1
2
3
4
5
6
7
8
9
10
[color=#FF0000]Red text[/color]
[url]https://en.scratch-wiki.info/wiki/Scratch_Wiki[/url]
[url=https://en.scratch-wiki.info/wiki/Scratch_Wiki]Scratch Wiki[/url]
[img]http://en.scratch-wiki.info/images/Scratch_Cat.png[/img]
[quote]This is an anonymous quote[/quote]
[quote=A_Scratcher]I'm being quoted![/quote]
[size=large]Large[/size]
[list][*]listitem[/list]
[align=center]This text is centered.[/align]
[style size='30px']Large Text[/style]


If there are any missing, please let me know and I will add them.

2

Tuesday, March 14th 2023, 11:13am

Hi,

there is actually no bbcode support, krpano only uses a bbcode-like 'encoding' to bypass the xml <> character limitations:

That means the '[' and ']' character are only converted to '<' and '>' and the resulting html code is used:

https://krpano.com/plugins/textfield/#text

Best regards,
Klaus

kme

Intermediate

  • "kme" started this thread

Posts: 264

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

3

Tuesday, March 14th 2023, 10:49pm

Ahaaa, now it makes sense. So this excersise was not so useful, cause we can use colors, just not in the BBCode way *g*
Thanks for the clarification *cool* *cool*