Table of Contents
The Document Panel
The Document panel is where you write: it holds the document of the selected object. This page explains the two views of a document, every button of the formatting toolbar, the Markdown that Skein understands, the keys of the editor, links to other objects and to web pages, images, colors and math, when a document is saved, and what the panel shows when a type or a folder is selected.
1. Formatted text and Markdown source
A document is stored as Markdown. The Document panel shows it in one of two views:
- Rich text (the first view): the formatting is shown as it looks, bold as bold and headings large, and you type into it as in a word processor.
- Plain text: the Markdown source itself, so you see and type
**bold**literally. Here the inline format buttons (andCtrl+B,Ctrl+I,Ctrl+U) put the Markdown marks around the selected text, or take them away when they are right around it, and Insert Link writes[text](target). The other buttons do nothing in this view.
Switch between them with Ctrl+M, View > Toggle Plain Text (it reads Toggle Rich Text while the Markdown source is shown), or the Plain Text button in the first group of the toolbar. The view stays the same when you select another object. Switching changes nothing in the document.
2. The formatting toolbar
The toolbar at the top of the panel has eight groups of buttons. Pause the pointer over a button to see its name. Buttons for formats that apply where the cursor is are shown pressed.
| Group | Buttons |
|---|---|
| History | Undo (Ctrl+Z), Redo (Ctrl+Y), Plain Text (the Markdown source; while it is pressed, its name is "Formatted Text (leave the Markdown source)"). |
| Formatting | Bold (Ctrl+B), Italic (Ctrl+I), Underline (Ctrl+U), Strikethrough, Superscript, Subscript, Inline Code, Highlight. |
| Colors | Foreground Color, Background Color (section 7). |
| Headings | Heading 1 to Heading 6. |
| Lists | Bullet List, Numbered List, To-do List. |
| Blocks | Block Quote, Horizontal Rule, Insert Image (section 6), Insert Link (section 5), Code Block, Insert Table, Insert Footnote, Inline Math, Display Math Block. |
| Admonitions | Note, Tip, Important, Warning and Caution admonitions: the selected lines become a marked note of that kind. |
| Indent | Indent, Outdent. |
The inline formats work on the selected text, and pressing a button again on exactly the same text takes the format away; with no text selected they do nothing. The heading, list, quote, code block and admonition buttons work on every line the selection touches, and they too need a selection. Pressing the button of the kind a line already has takes it away; another heading level, list kind or admonition kind changes the line to that one.
Some buttons put something new into the document. Horizontal Rule and Display Math Block make a line of their own at the cursor. Insert Table puts in a table of two rows and two columns; to give it more rows or columns, change it in the Markdown source. Insert Footnote puts a numbered mark at the cursor and an empty footnote line at the end of the document, and moves the cursor there so that you can type the note. Indent and Outdent move the lines the cursor or the selection is on one step in or out.
Arranging the toolbar. Each group has a grip at its left. Drag a group by its grip to put it in another place, or onto another row of the toolbar. Skein keeps the order and the rows in settings.conf (toolbar_group_order and toolbar_group_rows). When the panel is too narrow for one row, the groups wrap onto more rows by themselves.
3. The Markdown that Skein understands
Skein reads CommonMark with these additions, and writes back the same syntax:
| Format | Written as |
|---|---|
| Bold, italic | **bold**, *italic* |
| Underline | _underline_ (so _word_ is not italic) |
| Strikethrough | ~~struck~~ |
| Superscript, subscript | ^sup^, ~sub~ |
| Inline code | `code` |
| Highlight | ==marked== |
| Text and background color | <span style="color:#d03030">red</span>, and background-color in the same way |
| Headings | # Heading 1 to ###### Heading 6 |
| Lists | - item, 1. item, - [ ] to do, - [x] done, indented for a list inside a list |
| Block quote | > quoted |
| Admonition | > [!note] (or tip, important, warning, caution) on the first line, then > text |
| Horizontal rule | --- |
| Code block | Three backticks before and after; the code is colored by a simple general highlighter. |
| Table | GitHub's pipe tables: ` |
| Footnote | [^1] in the text and [^1]: the note below |
| Math | $x^2$ in a line, $$\int_0^1 f(x)\,dx$$ as a block (LaTeX) |
| Link | [label](target) and [[target]]; a bare web address is a link too. Skein writes every link back as [label](target), so [[dune]] becomes [dune](dune). |
| Image |  |
The status bar names the kind of Markdown it finds in the document (see The Window). Skein writes a document back in the syntax of this table, so Markdown typed in another style (for example __bold__) comes back in Skein's style after an edit.
4. Typing and the keys of the editor
| Key | What it does |
|---|---|
Ctrl+B, Ctrl+I, Ctrl+U |
Bold, italic, underline on the selection. |
Ctrl+Z, Ctrl+Y |
Undo and redo in the document. Ctrl+Shift+Z redoes too. The document has its own undo, separate from the project's. |
Ctrl+C, Ctrl+X, Ctrl+V |
Copy, cut and paste. Selecting text also makes it the primary selection, for a middle-click paste in other programs. |
Ctrl+A |
Selects the whole document. |
Arrow keys, Home, End |
Move the cursor; up, down, Home and End go by the lines as they are wrapped on the screen. With Shift they select. |
Page Up, Page Down |
Move the cursor up or down by a screen, and the view with it. With Shift they select. |
Tab |
Outside a table, types a tab. Use Indent and Outdent to move lines in and out. Ctrl+Tab moves the keyboard focus on to the Inspector. |
Escape |
Nothing in the text; it closes the Project Tree's Find bar when that is open. It never quits Skein. |
In a table cell. Click a cell to edit its text. Tab and Shift+Tab go to the next and the previous cell, Enter to the cell below, and the arrow keys move inside the cell and on to the next one at its end; past the table's first or last cell they leave the table. With Shift, the arrow keys select across cells. A cell shows its formatting (bold, italic, code, links ...), and bold and the other text formats apply to the text you select in it, as in the rest of the document; a click on a link in a cell follows it.
Lines wrap at word boundaries to the width of the panel. Accented letters and other characters that your keyboard types need no input method; text can also be typed with an input method, for languages that need one.
5. Links
To make a link, select the words that should become the link, press the toolbar's Insert Link button, and type the target at "Insert link (URL, or another file's name to link within the project):". With no text selected, the question still comes, but no link is made. In the Markdown source you can also write the link by hand.
A click on a link follows it:
| Target | A click |
|---|---|
An object's id, such as [Rye](obj_7f1c2a9b4e6d1a2f) |
Selects that object in the Project Tree, opening the rows above it, and shows its document. |
The name of an object that has the same parent object as this one, with or without .md |
The same. This is how the files of a Markdown folder link to each other: [see](other-note.md). |
An address starting with http://, https:// or mailto: |
Opens it with xdg-open: in your web browser or your mail program. |
| Anything else | Skein says that the link leads nowhere. |
Getting an object's id. Select the object's type: the Document panel lists the type's top-level objects as links. Press Ctrl+M to see the list as Markdown, and copy the link you need ([Rye](obj_...)) into your document.
Every link from one object to another is an edge on the Graph, and the object linked to lists the linking one under "Referenced by" on the Inspector's Relationships tab (see The Graph). The whole document is searched for links, however long it is.
6. Images
The toolbar's Insert Image button opens the "Insert Image" file dialog, which shows PNG, JPEG, GIF and BMP files. The chosen picture goes into the document at the cursor, on a line of its own, as ; selected text is replaced by it. The picture itself is not copied into the project: the document only names it.
- A relative path in an image is read from the folder of the project file, so a project can be moved together with a folder of pictures beside it. For a new project that has not been saved yet, it is read from the folder Skein was started in. In a note of a Markdown folder, it is read from the note's own folder.
- A picture is shown at most 320 pixels wide and 178 pixels high, keeping its shape, and never larger than it is.
- Every picture is decoded in a jailed worker process, never in Skein itself (see Safety). A picture that cannot be read or decoded, or any picture on a system without the jail, shows as an outlined box with the picture's path beside it.
7. Colors
Select some text and press Foreground Color or Background Color. A color picker opens, starting at a red (#d03030). Choose a color and press OK to color the selected text, or its background. Applying the same color again to exactly the same text takes it away. With no text selected, nothing is colored.
8. Math
Inline Math turns the selected text into an inline equation; Display Math Block makes a block equation. Both are LaTeX, drawn by Skein itself. The equations use the font of Settings > Editor > "LaTeX math font", "Latin Modern Math" at first. That font must be installed on your system; it comes with Skein's source in fonts/ (see Building and Installing). With the setting empty, equations are drawn in the document's own font. The font you set there is kept for the next start.
9. When a document is saved
What you type is kept in the open document until one of these moments, when it is written into the project:
- you select another object (or a type, or nothing);
- you save the project, or autosave saves it (Settings > General);
- you choose Save As... or Export as Static Site...;
- you quit, open or close a project, or open Markdown folders or files.
From there it reaches the file on disk with the next save of the project, see Projects and Saving. Undoing back to the text as it was last written counts as no change. A document is read and written whole, however long it is. For Markdown folders, the file of a note is written only when you save (see Markdown Folders).
10. What the panel shows for a type, a folder, or nothing
| Selected | The Document panel shows |
|---|---|
| An object | Its document. |
| An object type | A heading with the type's name and a list of links to its top-level objects, or "No objects of this type yet." |
| A folder of a Markdown folder | A heading with the folder's name and links to its subfolders (as name/) and its files, or "This folder is empty." |
| Nothing | An empty page. |
The lists are made fresh each time. You can type into them, but what you type is thrown away.
11. Known limitations
- A link to an object by its name works only between objects that have the same parent object. Top-level objects of a project are linked to by their id.
- An image's alt text (
) is not kept: it is empty after the document is saved. - The templates of Settings > Templates are fixed; they cannot be changed or added to.