/
bbcode-converter.html
147 lines (139 loc) · 10.7 KB
/
bbcode-converter.html
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8" />
<title>World Anvil Tools</title>
<meta name="description" content="A collection of tools designed to make simple tasks just a little bit easier." />
<meta name="author" content="Gabrielle Decker" />
<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- CSS
================================================== -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" />
<link rel="stylesheet" href="css/mdb.dark.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" />
<link rel="stylesheet" href="css/style.css" />
<!-- Favicons
================================================== -->
<link rel="icon" type="image/png" href="favicon.svg" />
<link rel="apple-touch-icon" href="apple-touch-icon.svg" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.svg" />
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114.svg" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js" integrity="sha384-Exdl7hU074DIu0FDUo/yWzxSmUwkPA3JUnxKitQvJKlrEJJON8FoNTh8xVJqwEBR" crossorigin="anonymous"></script>
</head>
<body>
<!-- Page start -->
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<!-- Container wrapper -->
<div class="container-fluid">
<!-- Collapsible wrapper -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Navbar brand -->
<a class="navbar-brand mt-2 mt-lg-0" href="index.html">
<img src="img/logo.svg" height="25" alt="Eivrall" loading="lazy" />
</a>
<!-- Left links -->
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="index.html">Tools</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="about.html">About</a>
</li>-->
<li class="nav-item">
<a class="nav-link" href="https://www.worldanvil.com/">World Anvil</a>
</li>
</ul>
<!-- Left links -->
</div>
<!-- Collapsible wrapper -->
</div>
<!-- Container wrapper -->
</nav>
<!-- Navbar -->
<!-- Content -->
<div class="container my-5">
<!-- Section: Components -->
<div class="pass-wrap">
<h4 class="text-center">HTML to WA BBCode</h4>
<br />
<p class="text-center">
This is not complete. I am manually adding rules for conversion as I go. Things like id's or<br />
classes on objects WA doesn't allow, such as <code><p class=""></code>, are left in the output.
</p>
<br />
<p class="text-center mark">Enter your HTML in the box below and click the "Convert" button to convert it to World Anvil BBCode.</p>
<br />
<textarea id="html-input" class="form-control my-2" placeholder="Enter HTML here"></textarea>
<br />
<button onclick="convertToBBCode()" class="btn-hover color-3">Convert</button>
</div>
<br />
<div class="pass-wrap">
<p class="h5 text-center">WA BBCode Output:</p>
<textarea id="bbcode-output" class="form-control my-2" placeholder="BBCode Will Generate Here"></textarea>
<br />
<button id="copy-button-1" class="btn-hover color-6" data-clipboard-target="#bbcode-output">Copy</button>
</div>
</div>
<!-- Content -->
<!-- Footer -->
<!-- <footer class="text-center text-lg-start bg-dark text-muted">
# Section: Social media
<section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom">
# Right
<div class="text-center w-25 mx-auto">
<a href="https://www.worldanvil.com/w/eivrall-1337spectra" class="me-4 text-reset">
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="25" height="25" viewBox="0 0 1000 1000">
<path
fill="#FFF"
d="M181.2 995.1c12.8-9 23.1-18.8 31.6-30.6 7.1-9.8 9.8-20.4 7.7-32.5-8.9-49.9-21.4-98.9-33.1-148.1-28.5-118.9-58.9-237.2-88.3-355.8-6.1-24.5-17.2-46.3-35.8-64-.7-.7-1.4-1.5-2.8-3.1 65.7-1 130.4 1.2 195.3-1.6-2.2 2.5-4.1 4.8-6.2 6.9-12.2 11.6-15.5 25.9-12.8 41.9 11.9 72.5 27.7 144.1 43 215.9 8.8 41.4 17.7 82.8 26.6 124.2.5 2.4 1.1 4.8 2.9 7.3 31.7-127.2 63.3-254.4 95-381.7h1.1c32.9 122 65.8 244.1 98.7 366.1h1.2c2.2-11.6 4.5-23.3 6.7-34.9 20.7-109.5 41.5-219 62-328.5 2.8-14.9-1.8-28.5-10.9-40.3-4.7-6.1-11.3-9.2-19.1-9.9-29.5-2.6-59-4.8-88.3-9.4-30.5-4.8-60.8-10.9-89.5-22.7-15.7-6.5-30.5-14.5-42-27.5-3.3-3.8-6.2-7.8-8.3-13.2h213.2v-30.3h383.3c1.2 3.9 1.4 24 .1 29.9-12.2.5-24.5 1.4-36.7 3.4-29.5 4.7-57.9 12.8-82.6 30.4-20.3 14.5-33.4 33.7-38.1 58.5-1.3 6.6-.3 12.8 1.1 19.2 13.2 59 28.8 117.4 44 176 8.4 32.7 17.1 65.3 25.7 97.9.4 1.4.8 2.7 1.4 4.8 30.1-9.4 59.9-18.7 90.4-28.2 2.8 11.5 5.5 22.6 8.1 33.7 3 12.6 5.8 25.2 9.1 37.7 1.2 4.4.7 6.5-4 8.4-23.6 9.1-47 18.7-70.5 28.1-1.8.7-3.6 1.5-5.9 2.4 2.6 12.3 5.1 24.4 7.9 36.4 13.5 58.8 28.2 117.2 49.4 173.8 7.5 20 15.9 39.7 27.4 57.8.3.4.3 1 .6 1.8H721.7c-.3-2.3 1.7-3.3 2.8-4.7 12.2-15.8 24.4-31.5 33.3-49.5 3.3-6.6 4.6-13.3 3.4-20.8-8.1-49-16-98.1-23.9-147.2-.1-.7-.4-1.3-.7-2.3-.8.1-1.5.1-2.1.3-39 16.7-75.7 37.3-106.5 67-14.6 14.1-26.5 30.1-33.3 49.6-4.3 12.3-2.5 24.9-2.8 37.4 0 .8.5 1.7.9 2.5 14.1 23.1 29.7 45 51.3 61.8 1.3 1 2.6 1.9 4 2.8 1.3.9 2.6 1.7 4.7 3.2H428.7c9.6-8.9 15.8-19.2 17.5-31.7 1.6-12.5-1.1-24.7-3.2-36.9-9.1-53.8-20.8-107.1-30.6-160.8-.2-1-.5-1.9-1.6-2.9-1.6 7.9-3.2 15.7-4.7 23.6-9.4 48.3-20.8 96.1-27.9 144.8-1.4 9.8-3.2 19.5-3 29.4.2 13.3 3.5 25.2 15.4 34.4-70.3-.2-139.2-.2-209.4-.2zm537.7-319.2c-18-49.2-35.8-97.9-53.6-146.6-.4.1-.9.2-1.3.3-13.1 66.6-26.2 133.1-39.6 201.2 29-24.3 61.5-39.4 94.5-54.9zM815.8 182c2.8-16.7 5.5-32.7 8.2-49-116.7-17.9-232.4-35.7-348.7-53.6C479.9 56 484.4 33 489 9.5c-7.8-1.5-15-2.6-22.1-4.4-3.5-.9-5.4-.1-7.5 2.9-11.3 16.8-22.8 33.5-34.3 50.3-1.6 2.3-2.5 4.6-3 7.4-4.1 23.5-8.4 47-12.5 70.5-.9 4.9-2.3 9.7-2.2 15 17.4 3.1 34.5 6.2 51.8 9.3 3.1-15.7 6.1-30.8 9.2-46.2 115.4 25.8 230.8 48.2 347.4 67.7z"/>
</svg>
</a>
<a href="https://www.linkedin.com/in/gabrielle-decker/" class="me-4 text-reset">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 448 512">
<path
fill="#FFF"
d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"/>
</svg>
</a>
<a href="https://1337spectra.github.io/" class="me-4 text-reset">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 496 512">
<path
fill="#FFF"
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/>
</svg>
</a>
</div>
# Right
</section>
# Section: Social media
# Copyright
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);">
© 2023 Copyright:
<a class="text-reset fw-bold" href="https://www.worldanvil.com/w/eivrall-1337spectra">Gabrielle Decker</a>
</div>
# Copyright
</footer>
# Footer -->
<!-- Page end -->
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/mdb.min.js"></script>
<script src="js/converter.js"></script>
<script>
var copyButtons = document.querySelectorAll("[data-clipboard-target]");
var clipboard = new ClipboardJS(copyButtons);
clipboard.on("success", function (event) {
event.clearSelection();
event.trigger.textContent = "Copied!";
setTimeout(function () {
event.trigger.textContent = "Copy";
}, 2000);
});
</script>
</body>
</html>