draft-js-code
draft-js-code copied to clipboard
support 'code' in hasSelectionInBlock (see react-draft-wysiwyg)
I'm new to Draft, I don't know if code-block is a standard and should be followed, or if you get to make your own or what. https://github.com/jpuri/react-draft-wysiwyg inserts code, so this adds support for that (alternatively ~currentBlock.getType().indexOf('code') in case other editors use codeblock or whatever).
Coverage remained the same at 99.265% when pulling ebcd05731f77c34a07f0a210b136bed37f0ac014 on lefnire:master into c219dc50d42f7db9c69b4b8c9be4b437116e8e6a on SamyPesse:master.
Ah, <pre> maps to code-block, and <code> to code. So this PR should cover everything