Sources/OrgLive/Sample.swift
66 lines · 1616 bytes
1/// Initial editor content: a tour of the org syntax the editor highlights and renders.
2let sample = """
3#+TITLE: org-live
4#+AUTHOR: Your Name
5#+DATE: <2026-11-01 Sun>
6
7Type org-mode on this side; the HTML appears below. Replace this text with
8your own, then save it as .org or .html.
9
10* Text
11Inline markup: *bold*, /italic/, _underline_, +strike-through+, =verbatim=
12and ~code~. Superscripts like E = mc^2 work too.
13
14Links: [[https://orgmode.org][the org-mode site]], a bare URL such as
15https://orgmode.org/manual/, and a footnote reference.[fn:1]
16
17Timestamps: <2026-11-02 Mon 10:00>, inactive [2026-10-31 Sat], and a range
18<2026-11-03 Tue>--<2026-11-05 Thu>.
19
20* TODO [#A] Lists :lists:
21- Unordered items
22 - nest by indenting
23- [X] checkbox, done
24- [ ] checkbox, open
25
261. Ordered items
272. count themselves
28
29- Term :: a description list pairs a term with its definition
30
31** DONE Sub-heading with a tag :done:
32Headings go three levels deep here, and further in org.
33
34*** Third level
35
36* Tables
37| Language | Year | Typing |
38|----------+------+---------|
39| Swift | 2014 | static |
40| Lisp | 1958 | dynamic |
41
42* Blocks
43#+begin_src swift
44let greeting = "Hello, *org*"
45print(greeting)
46#+end_src
47
48#+begin_quote
49Org mode is for keeping notes, maintaining TODO lists, planning projects,
50and authoring documents with a fast and effective plain-text system.
51#+end_quote
52
53#+begin_example
54Example blocks keep their text exactly as written.
55#+end_example
56
57#+begin_center
58Centered text
59#+end_center
60
61-----
62
63# A comment line: in the source, not in the output.
64
65[fn:1] Footnotes are collected at the end of the document.
66"""