Skip to content

Commit 7ed1c3c

Browse files
committed
Adding configs! Can now use monospace font and block long lines
1 parent 8b12006 commit 7ed1c3c

File tree

8 files changed

+514
-53
lines changed

8 files changed

+514
-53
lines changed

demo.html

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<link rel="stylesheet" media="all" href="dist/sn-codemirror-search/dialog/dialog.css">
1818
</head>
1919

20-
<body style="padding: 10px; box-sizing: border-box">
21-
<div id="wrapper" style="border: 2px solid black; max-width: 1200px">
20+
<body style="padding: 10px; box-sizing: border-box; max-width: 1200px">
21+
<div id="wrapper" style="border: 2px solid black">
2222
<textarea id="code" name="code" style="height: 100%">
2323
# Indent editor
2424
This is a demo of the Indent Editor for Standard Notes.
@@ -70,8 +70,16 @@
7070
Lastly, you can ctrl+click on those links to open those pages in a new tab. Try it!
7171

7272
# Paragraphs
73+
(This part about paragraph usually doesn't happen on mobile, because your screen is not large enough. Try it on a desktop / laptop!)
74+
7375
You may have already noticed that lines that wrap don't go as far right as they could. The lines instead stop after around 50 characters. This avoids paragraph that are super large or long line followed by very few words, both harder to read. This usually has no effect on mobile because screen aren't as large. Also for that readability goal, lines that wrap have a little bit less space between the lines.
7476
You can see the little extra spacing between this line and the above paragraph.
77+
Note that lines that are not wrapping can end up longer than paragraphs. Depending on your screen, this line might be longer than the paragraph.
78+
-> This is useful if you mostly do lists with sometimes long lines.
79+
-> This avoids having a 2nd line with a single word; it will wrap a chunk of the line. Try adding words here until it warps!
80+
-> This can be changed in the setting
81+
82+
**********-> Note that paragraphs' will be moved as a whole by indentation. The paragraph itself will have the same size as other ones. So this paragraph's right side is further to the right than the one that is a few lines above. You can try adding/removing some of the stars at the begining of this to see the whole paragraph moving with the indentation.
7583

7684
# Code
7785
You can use `backticks` to have a piece of code in a line.
@@ -127,6 +135,32 @@
127135
If you like it, please consider sponsoring the project on https://github.com/MaxLap/standard-notes-indent-editor.
128136

129137
</textarea>
138+
<button id="config-panel-toggle" style="position: absolute; right: 15px; top: 1px; z-index: 10" onclick="displayConfig()">
139+
cfg
140+
</button>
141+
<div id="config-panel" style="display: none; position: absolute; top: 0px; bottom: 0px;">
142+
Use monospace font for this note <br/>
143+
<label><input type="radio" name="monospace" value="yes" onclick="changeMonospaceConfig('yes')"/> yes </label>
144+
<label><input type="radio" name="monospace" value="no" onclick="changeMonospaceConfig('no')"/> no </label>
145+
<label><input type="radio" name="monospace" value="default" onclick="changeMonospaceConfig('default')"/> default </label>
146+
147+
<br/><br/>
148+
149+
Allow non-wrapping lines to be longer for this note <br/>
150+
<label><input type="radio" name="allow_longer_lines" value="yes" onclick="changeAllowLongerLinesConfig('yes')"/> yes </label>
151+
<label><input type="radio" name="allow_longer_lines" value="no" onclick="changeAllowLongerLinesConfig('no')"/> no </label>
152+
<label><input type="radio" name="allow_longer_lines" value="default" onclick="changeAllowLongerLinesConfig('default')"/> default </label>
153+
154+
<br/><br/>
155+
156+
Indent Editor is free, please consider supporting me! <a href="https://github.com/MaxLap/standard-notes-indent-editor">(Click sponsor)</a>
157+
158+
<br/><br/>
159+
160+
<button onclick="hideConfig()">
161+
Close
162+
</button>
163+
</div>
130164
<div>
131165
</body>
132166
</html>

dist/dist.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)