diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-25 11:48:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-25 11:48:08 +0000 |
commit | c6f380135d93ffecb192d30d7323888eb3d051f3 (patch) | |
tree | 1915cb4f3170fbf6c559b108a762b711177c62a3 /src/shared/utils/dom.js | |
parent | ccc81312a1d4d9a5cea7d7451c26ec25b2172aa8 (diff) | |
parent | a4b86bf3a06c9f4e78bd5a714ae4673066a2f23f (diff) |
Merge pull request #93 from ueokande/improve-for-certain-pages
Improve for aberration pages
Diffstat (limited to 'src/shared/utils/dom.js')
-rw-r--r-- | src/shared/utils/dom.js | 8 |
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 }; |