-
Notifications
You must be signed in to change notification settings - Fork 0
/
block-without-width.html
24 lines (24 loc) · 1.03 KB
/
block-without-width.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
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' type='text/css' href='paste-template.css'>
</head>
<body>
<script>
function getPasteHTML() {
let div = document.createElement('div');
div.innerHTML = `<div style="contain: strict; width: 402px; height: 38px;">
<div style="display: grid; grid-template-rows: 19px;">
<div style="grid-row:1; width:300px; height:19px; background-color: green; color:yellow;">AREA-SELECTED HEADING</div>
<div style="width:402px; height:19px; grid-row: 2;">Short area-selected text</div>
</div>
</div>`;
return div.firstChild;
}
</script>
Some not selected text before.
<div style="width:300px; background-color: green; color:yellow;">AREA-SELECTED HEADING</div>
<div>Short area-selected text</div>
<script src='paste-template.js'></script>
</body>
</html>