No canvas, no party

Lua Text Editor

A simple text editor written in lua.

How it works:

You have to:

get an editor with makeEditor(rows, cols, drawStringFunction, initialText)

provide a drawString(text, x, y, col) callback function to draw strings. The editor will use it to compose the screen. It expects fixed width characters

feed the editor with key inputs by calling the right methods, such as pageUp, backspace, insertPrintable, etc

draw the editor by calling editor:drawCode(x,y)

The code will take care of the rest. You can query the buffer content with editor:getText() and set it with editor:setText()

Missing features: scrolling to the right, selection, copy/paste, syntax highlighting, propert tabulation, scrollbars, etc