Skip to content

Commit 05f9c1e

Browse files
author
Frank Pagan
committed
feat: replaced get-value and set-value with a super charged version of CoCreate-events
1 parent db8cb3e commit 05f9c1e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h2 class="border-bottom:1px_solid_lightgrey padding:5px_0px">Demo</h2>
7272
</div>
7373

7474
<div id="demo-preview" class="position:relative overflow:auto background-color:white">
75-
<div get-value="#demo" class="padding:20px"></div>
75+
<div class="demopreview" class="padding:20px"></div>
7676
</div>
7777

7878
<div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">

src/setValue.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ const setValue = (el, value) => {
7777

7878
else {
7979
if (el.hasAttribute('contenteditable') && el == document.activeElement) return;
80-
if (el.tagName === 'DIV') {
81-
if (!el.classList.contains('domEditor') && !el.hasAttribute('get-value') && !el.hasAttribute('get-value-closest'))
82-
return
83-
}
80+
// if (el.tagName === 'DIV') {
81+
// if (!el.classList.contains('domEditor') && !el.hasAttribute('get-value') && !el.hasAttribute('get-value-closest'))
82+
// return
83+
// }
8484

8585
if (valueType == 'string' || valueType == 'text')
8686
el.textContent = value;

0 commit comments

Comments
 (0)