Skip to content

gkaemmer/canvas-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code editor with canvas

View demo here

This is an attempt to make a native-feeling code editor where all code is rendered to a canvas, instead of being rendered with the DOM (as with Ace and similar projects).

For now it's just a prototype, but this type of rendering could (maybe) simplify dealing with multiselect, buffering different parts of the file, and rendering funky things like newlines, spaces, and find results. It's also just an interesting exercise to find all the little things we're used to when we edit text.

TODO

So many things

  • Scrolling/buffering
  • Break keyboard event management into a separate module
  • Render multiple layers separately (background, selection, text, cursor)
  • File I/O
  • Copying/cutting (pasting already works)
  • Double/triple clicking to select words/lines
  • More keyboard shortcuts (ctrl-a, etc)
  • Finding/replacing
  • Dead keys (ä, é, etc)
  • Multiselect
  • Endless features...

About

A code editor, drawn from scratch on a canvas element

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published