Closed jonsmithers closed 7 years ago
How would they get the html though? I think they would have to enter dev tools on orderup, which would be a bad experience I feel.
They've already been copying html this whole time. We just need to accept html instead of text.
If you copy anything on this webpage and paste it into word document, it'll paste as rich text or something. If you paste it into order splitter's <textarea>
element, it'll paste as text. If you paste into a <div contenteditable="true">
element, it'll paste as html.
Evernote.com uses content editable divs. See how I pasted html?
WOAH! That's awesome! I'm sold.
I think the input/parser design is fundamentally limiting. When the user copies the orderup receipt and pastes it into our textarea, it gets transformed from html into plaintext, so we lose lots of useful information. Consequently, we're make the user enter sales tax, processing fee, and delivery fee manually.
We can just let the user paste html instead of plain text by using the contenteditable attribute on on a
<div>
. Then we'd have the html to work with. (Also, we could re-use the same parser in a "live preview" in the chrome-extension.)tl;dr The parser should be html-based, not text-based.