markdown-komponents 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html ADDED
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>markdown-komponents</title>
6
+ </head>
7
+ <body>
8
+ <!--
9
+ This page is a dev harness for the library, not part of it — it's exactly what a caller
10
+ would write: plain markup, mounted whenever/wherever they choose.
11
+ -->
12
+ <button id="auto-normalize-toggle">Auto-normalize: ON</button>
13
+ <markdown-document toolbar="true">
14
+ <markdown-header-1>Markdown editor</markdown-header-1>
15
+ <markdown-paragraph>Start typing here.</markdown-paragraph>
16
+ </markdown-document>
17
+
18
+ <script src="markdown-komponents.js"></script>
19
+ <script>
20
+ var doc = document.querySelector('markdown-document');
21
+ var toggle = document.getElementById('auto-normalize-toggle');
22
+ toggle.addEventListener('click', function () {
23
+ doc.autoNormalize = !doc.autoNormalize;
24
+ toggle.textContent = 'Auto-normalize: ' + (doc.autoNormalize ? 'ON' : 'OFF');
25
+ });
26
+ </script>
27
+ </body>
28
+ </html>