forked from rsnyder/juncture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpretty.html
30 lines (26 loc) · 1.46 KB
/
pretty.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/simply-beautiful@latest/dist/index.min.js"></script>
<script type="text/javascript">
var beautify = SimplyBeautiful(); // The script above exposes the global variable 'SimplyBeautiful'
var options = {
indent_size: 2,
// ...
}
let html = `<section class="section1" data-id="1">
<h1 class>The Amalfi Coast</h1>
<ve-image class="right" src="wc:AmalfiCoast11.jpg">
</ve-image>
<p data-id="1.2" id="1.2" class="segment">The Amalfi Coast is a stretch of coastline in southern Italy overlooking the Tyrrhenian Sea and the Gulf of Salerno. It is located south of the Sorrentine Peninsula and north of the Cilentan Coast.</p>
<p data-id="1.3" id="1.3" class="segment">Celebrated worldwide for its Mediterranean landscape and natural diversity, the Coast is named after the town of Amalfi, which makes up its main historical and political center. It is a very popular jet set destination, and has been an attraction to upper-class Europeans since the 18th century, when it was a frequent stopover on their Grand Tours. Attracting international tourists of all classes annually, the Amalfi Coast was listed as a UNESCO World Heritage Site in 1997.</p>
</section>`
console.log(beautify.html(html, options));
</script>
</body>
</html>