For those who is interested, here is my attempt to implement the input field with the requested features (took me about a week by itself, so it's not a part of my submission). Features covered:
- Custom Undo / Redo history (no document.execCommand used), edit history is implemented using CacheStorage (virtually unlimited storage).
- Supports markdown (bold, strikethroug, _italic_, underline, spoiler)
- Markdown parsing done asynchronously using Web worker (so it will never freeze or block UI).
- Source code can fit one screen, so it's not rocket science and simple to understand
I thought like, okay I couldn't finish it before deadline, however won't be bad to share it with the community:
https://github.com/angrycoding/react-contenteditable-input
DEMO: https://angrycoding.github.io/react-contenteditable-input/