![]() So, that’s about your choice of input mechanism. The code will be continously published to: Input Spike Elm ports or custom elements only if it is really necessary. Try to do it in pure Elm if possible, so that the complete code can be published as a package.Allow text selection with Shift+Arrow keys.Allow text selection with the mouse by click and drag.Capture and display all keyboard input to the editing area.That said, if anyone has some thoughts or opinions on the best way to go about this, I would very much appreciate hearing them. Since I am borrowing lessons learned from CodeMirror ( ), I will try approach two first. Three is to use a content-editable and capture the user input via the browser. Two is to have a hidden textarea and capture the user input via the browser. One is to handle all keyboard events in Elm. Full unicode support, for example, is probably too big a topic for this spike - getting the basics working is really what I am aiming for here. ![]() That actually seems to work very well for my standard layout GB-English keyboard, and as an English speaking only person, I must admit a gross level of ignorance about IME, non-English keyboards and so on. So far, I captured keyboard events with onKeydown and processed those in Elm. Now I want to figure out what is the best way of capturing input. The final part in this 3 part mini-series on text editing in Elm. ![]()
0 Comments
Leave a Reply. |