8

Chrome/Safari support css:

-webkit-user-modify:read-write-plaintext-only , which can disable user paste rich text into a contenteditable div.

I do not know how to get it in firefox and IE.

virsir
  • 15,159
  • 25
  • 75
  • 109
  • maybe https://stackoverflow.com/questions/24408028/html5-contenteditable-div-accept-only-plaintext/31627656#31627656 can to some part what you look for. My answer http://stackoverflow.com/a/31627656/1711186 there uses javascript to mimic the plaintext only behaviour – humanityANDpeace Jul 25 '15 at 14:48

1 Answers1

0

I believe you can use the -moz prefix for firefox

-moz-user-modify: read-write-plaintext-only;

And for IE (10+) you can use the -ms prefix

-ms-user-modify: read-write-plaintext-only;

It would also be proper to add it without the prefix for future proofing ;)

user-modify: read-write-plaintext-only;
gomezruo
  • 17
  • 3