-
Notifications
You must be signed in to change notification settings - Fork 1
/
Index.cshtml
59 lines (44 loc) · 1.21 KB
/
Index.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@page
@model IndexModel
@using ULabs.BBCodeParser.Html
@inject BBCodeToHtml bbCodeToHtml
@inject BBCodeEditorSanitizer bbCodeEditorSanitizer
@{
ViewData["Title"] = "Home page";
}
<style>
.text-shadow {
text-shadow: 1px 1px #ff0000;
}
</style>
<h1>ULabs BBCode-Parser Demo</h1>
@Html.Raw(bbCodeToHtml.Parse(@"
This is [b]bold[/b], [i]italic[/i], [u]underline[/u] and [s]strike through[/s].
More complex example:
[list]
[*] List item #1
[*] List item #2
[/list]
[list=1]
[*] Ordered List item 1
[*] Ordered List item 2
[/list]
[quote]This is a quote[/quote]
[center]Something centered[/center]
[color=red]Attention! Important text[/color]
[url=https://u-labs.de/forum]Link to U-Labs[/url]
Embedded image:
[img]https://u-img.net/img/8016La.png[/img]
[size=7]Size 7 headline[/size]
[size=6]Size 6 headline[/size]
[size=5]Size 5 headline[/size]
[sup]A very small text[/sup]
[font=serif]Playing with serif font family[/font]
[shadow]Custom BBCodes are possible too: Here we have a shadow code[/shadow]
[code] ps -guaxf | grep foo[/code]
[spoiler]Test[/spoiler]
[ATTACH]9369[/ATTACH]
[HR][/HR]
[video=youtube;8D2x1MzqVpM]https://www.youtube.com/watch?v=8D2x1MzqVpM[/video]
[youtube]wzc_VNh42HM[/youtube]
"))