Last active
December 18, 2015 12:58
-
-
Save f0urfingeredfish/5786090 to your computer and use it in GitHub Desktop.
Modernizr.plaintextOnly test for <div contentEditable="plaintext-only">. Currently only works in webkit. see http://stackoverflow.com/questions/10672081/how-to-detect-if-browsr-supports-plaintext-only-value-in-contenteditable-para
for more details.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//source | |
//http://stackoverflow.com/questions/10672081/how-to-detect-if-browser-supports-plaintext-only-value-in-contenteditable-para | |
Modernizr.addTest('plaintextonly', function(){ | |
var d = document.createElement("div"); | |
try { | |
d.contentEditable="PLAINtext-onLY"; | |
} catch(e) { | |
return false; | |
} | |
return d.contentEditable=="plaintext-only"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment