File tree Expand file tree Collapse file tree 1 file changed +25
-28
lines changed Expand file tree Collapse file tree 1 file changed +25
-28
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,18 @@ <h3>Source</h3>
6363
6464< code-block language ="html ">
6565< textarea > < code-block language ="html ">
66- < textarea > < script > console . log ( true ) ; </ script > </textarea>
66+ < textarea >
67+ < script > console . log ( true ) ; </ script >
68+ </textarea>
6769</ code-block > </ textarea >
6870</ code-block >
6971
7072< h3 > Result</ h3 >
7173
7274< code-block language ="html ">
73- < textarea > < script > console . log ( true ) ; </ script > </ textarea >
75+ < textarea >
76+ < script > console . log ( true ) ; </ script >
77+ </ textarea >
7478</ code-block >
7579
7680< h2 > Playground</ h2 >
@@ -79,46 +83,39 @@ <h2>Playground</h2>
7983
8084< p > Let's run these JS on this page.</ p >
8185
82- < code-block language ="js " controls >
83- < textarea > {
84- const value = `< div >
86+ < code-block language ="js " label ="Example: HTML " controls >
87+ < textarea >
88+ cb.language = 'html';
89+ cb.value = `< div >
8590 < h2 > Hello world</ h2 >
8691
8792 < p class ="example "> This is sample markup.</ p >
8893</ div > `;
94+ </ textarea >
95+ </ code-block >
8996
90- cb.value = value;
91- cb.language = 'html';
92- }</ textarea >
97+ < code-block language ="js " label ="Example: CSS " controls >
98+ < textarea >
99+ cb.language = 'css';
100+ cb.value = `body {
101+ /* This is sample css */
102+ font-size: 100px;
103+ }`;
104+ </ textarea >
93105</ code-block >
94106
95- < code-block language ="js " controls >
96- < textarea > {
97- const value = `{
107+ < code-block language ="js " label ="Example: JSON " controls >
108+ < textarea >
109+ cb.language = 'json';
110+ cb.value = `{
98111 "items": [
99112 100,
100113 null,
101114 "This is sample json"
102115 ]
103116}`;
104-
105- cb.value = value;
106- cb.language = 'json';
107- }</ textarea >
108- </ code-block >
109-
110- < code-block language ="js " controls >
111- < textarea > {
112- const value = `body {
113- /* This is sample css */
114- font-size: 100px;
115- }`;
116-
117- cb.value = value;
118- cb.language = 'css';
119- }</ textarea >
117+ </ textarea >
120118</ code-block >
121-
122119</ main >
123120< footer >
124121< p > < a href ="https://github.com/heppokofrontend/html-code-block-element "> Github</ a > </ p >
You can’t perform that action at this time.
0 commit comments