sidneynemzer / elm-text-editor Goto Github PK
View Code? Open in Web Editor NEWA text editor written completely in Elm
Home Page: https://sidneynemzer.github.io/elm-text-editor/
A text editor written completely in Elm
Home Page: https://sidneynemzer.github.io/elm-text-editor/
I think this file/module structure makes sense:
src/
TextEditor.
init
update
view
TextEditor/
Custom.
init
update
view
Internal.
InternalState
Snapshot
init
update
view
Buffer
History
Keymap
Events.
onKeydown
onTripleClick
alwaysStopPropagationOn : String -> msg -> Attribute msg
mouseDown
mouseOver
mouseUp
keypress
Exposed modules: TextEditor, TextEditor.Custom, TextEditor.Buffer, TextEditor.History
The TextEditor module has a single value that you keep in your model, it handles updating the buffer and history internally. TextEditor.Custom asks you to pass the Buffer and History so that these can be shared across several editors.
In French, we need to use dead keys and composition events to generate some characters (like ĂȘ). Unfortunately, those events are not fired if contenteditable is not used.
Very cool stuff from the lab you have there.
Is it possible to adapt your solution so that any element can be made content editable?
That means basic selection, insert, delete, select, copy and paste operations. The buffer should be rendered to an html element with a non-fixed with font.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. đđđ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google â€ïž Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.