Pictures and media
A picture is written as a Markdown image, , and drawn in place as one piece of the text.
A picture and its caption
Write under a picture to change its caption. The second has none yet.
What it stores
Captions
Section titled “Captions”A picture’s caption is its alt text. Write under the picture to change it; the Markdown follows. Right-click a picture and choose Add a caption to write one.
A picture is its own size, up to sixteen squares wide, until it is given a width of its own. Rest the pointer on it and a grip shows on its end edge: pull it, and the picture is a whole number of squares wide, from four to as many as its line holds. Let go, and the width is written into the Markdown as the picture’s title, one step to undo:
A double press on the grip gives the picture back its own size. In columns a picture without a width fills its column.
Sound and film
Section titled “Sound and film”An image whose address ends in mp4, webm or mov is drawn as a film, and one ending in mp3, wav, ogg or m4a as sound, each with the browser’s controls. A data address of an audio or video type is drawn the same way.
Aa never keeps or uploads a file itself. A picture or file pasted or dropped into the editor is handed to onFiles, and your app uploads it and writes its address back:
const editor = createEditor(host, { onFiles: async files => { for (const file of files) { const url = await upload(file) const at = editor.selection() if (at) editor.replace(at.start, at.end, ``) } },})Files dropped or pasted
Drop a picture here, paste one, or type /image. This page keeps it in the Markdown as a data address; an app uploads it.
What it stores
editor.insertFile(file) hands a file to onFiles the same way, for a picker of your own.
Pictures side by side
Section titled “Pictures side by side”Carry one picture to another’s side to stand them in columns.
Drawn as an atom
Section titled “Drawn as an atom”Pictures are Aa’s first atom, imageAtom, on by default. An app that gives its own atoms includes imageAtom among them to keep pictures.