## A bridge between the DOM and Gemini
gmi.js is made up of lines!
const line = Gemini.line("manipulate the dom\nbut like in a Gemini way\ntry it!")
> now try changing the type and content and observing the effects.
line.type = "UL"
line.content = "now\nit's\na\nlist"
A document provides a way to handle many lines together:
window.gmi = new Gemini(document.body)
window.gmi.lines = [
Gemini.line("http://talon.computer/js/ now... take me back please", "A"),
window.gmi.lines.type = "H3"
> the gemtext source is available via .source
> or maybe a .gmi file would be easier?
All the gmi.css variables are also available as properties.
let foreground = window.gmi.foreground
let background = window.gmi.background
window.gmi.foreground = background
window.gmi.background = foreground
=> /css/ learn more about gmi.css
=> https://git.sr.ht/~talon/gmi-web/tree gmi.js is licensed under CC0 and available on sourcehut as apart of gmi-web
### [WIP] editing!
* enter creates new P
* shift + enter creates newline
* backspace at beginning of line doesn't remove DOM (+ delete on empty lines)
* cross-platform action for changing line type?
* cross-platform action for toggling editable?