https://github.com/breuleux/quaint-quaint
Embed interactive Quaint editor in Quaint document
https://github.com/breuleux/quaint-quaint
quaint
Last synced: about 1 month ago
JSON representation
Embed interactive Quaint editor in Quaint document
- Host: GitHub
- URL: https://github.com/breuleux/quaint-quaint
- Owner: breuleux
- Created: 2016-01-17T06:19:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T05:34:24.000Z (over 8 years ago)
- Last Synced: 2025-01-18T20:43:50.177Z (4 months ago)
- Topics: quaint
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# quaint-quaint
Interactive Quaint textboxes in Quaint documents.
`quaint-quaint` will automatically start a Quaint interpreter
listening to changes to one or more textareas and running in a
separate Worker. For each marked `textarea`, an output `div` is
created and will be updated automatically with the result of the
compilation of the current contents.`quaint-quaint` does not define a stylesheet, but it should not be
very complicated to style. See below for the generated HTML.## Install
quaint --setup quaint
## Sample use
```quaint
Edit this:&&
Quaint is __awesome!
# One
# Two
# ThreeTen-lines-high uninitialized editor:
10 &&
```The generated code will look like this:
```html
Quaint is __awesome
Quaint is awesome
````quaint-quaint` does not contribute any stylesheet, so you will need
to style the above yourself.## Rules
### `nrows && body`
Creates an interactive Quaint editor initialized with `body`, and with
`nrows` rows of text. If `nrows` is unspecified, then the number of
lines in `body` will be used (line wrapping is not taken into
account).## Options
### `preCompute`
(default: true)
If `true`, Quaint will pre-compute the result of every interactive
editor. That's kind of slow, so you can flip that off if needed, while
developing.