aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/utils/dom.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/utils/dom.js b/src/shared/utils/dom.js
new file mode 100644
index 0000000..c111ee7
--- /dev/null
+++ b/src/shared/utils/dom.js
@@ -0,0 +1,8 @@
+const isContentEditable = (element) => {
+ return element.hasAttribute('contenteditable') && (
+ element.getAttribute('contenteditable').toLowerCase() === 'true' ||
+ element.getAttribute('contenteditable').toLowerCase() === ''
+ );
+};
+
+export { isContentEditable };