mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 20:09:57 +00:00
Add a settings page for markdown plugin (#8585)
* Add a settings page for markdown plugin * Add link to $:/config/markdown/renderWikiText * Place "Quotes replacement" settings after "Typographer" * Add link to plugin itself & remove transclusion in config tab The transclusion to $:/plugins/tiddlywiki/markdown/settings in config tab is removed to avoid confusion * Add settings tab in plugin info
This commit is contained in:
parent
8a8dcf8255
commit
3434884ea4
@ -2,16 +2,6 @@ title: $:/plugins/tiddlywiki/markdown/config
|
|||||||
|
|
||||||
! Plugin Configuration
|
! Plugin Configuration
|
||||||
|
|
||||||
|!Config |!Default |!Description |
|
|
||||||
|[[breaks|$:/config/markdown/breaks]]|`false`|markdown-it library config: Convert '\n' in paragraphs into `<br>` |
|
|
||||||
|[[linkify|$:/config/markdown/linkify]]|`false`|markdown-it library config: Autoconvert URL-like text to links |
|
|
||||||
|[[renderWikiText|$:/config/markdown/renderWikiText]]|`true`|After Markdown is parsed, should any text elements be handed off to the ~WikiText parser for further processing? |
|
|
||||||
|[[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]]|<code><$view tiddler="$:/plugins/tiddlywiki/markdown" subtiddler="$:/config/markdown/renderWikiTextPragma" mode="inline"/></code>|When handing off to the ~WikiText parser, what parser rules should it follow? |
|
|
||||||
|[[typographer|$:/config/markdown/typographer]]|`false`|markdown-it library config: Enable some language-neutral replacement + quotes beautification |
|
|
||||||
|[[quotes|$:/config/markdown/quotes]]|`“”‘’`|markdown-it library config: Double + single quotes replacement pairs, when `typographer` is enabled |
|
|
||||||
|
|
||||||
''IMPORTANT:'' You must reload your wiki for changes to take effect.
|
|
||||||
|
|
||||||
<h2 style="margin-top:1.5em">~WikiText Pragma</h2>
|
<h2 style="margin-top:1.5em">~WikiText Pragma</h2>
|
||||||
|
|
||||||
The value of [[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]] has been carefully tuned to properly integrate markdown with ~TiddlyWiki. Changing this setting may produce unexpected results, but the inclusion of the following parser rules should be fine:
|
The value of [[renderWikiTextPragma|$:/config/markdown/renderWikiTextPragma]] has been carefully tuned to properly integrate markdown with ~TiddlyWiki. Changing this setting may produce unexpected results, but the inclusion of the following parser rules should be fine:
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"title": "$:/plugins/tiddlywiki/markdown",
|
"title": "$:/plugins/tiddlywiki/markdown",
|
||||||
"name": "Markdown",
|
"name": "Markdown",
|
||||||
"description": "Markdown parser based on markdown-it",
|
"description": "Markdown parser based on markdown-it",
|
||||||
"list": "readme config syntax license",
|
"list": "readme config settings syntax license",
|
||||||
"stability": "STABILITY_2_STABLE"
|
"stability": "STABILITY_2_STABLE"
|
||||||
}
|
}
|
||||||
|
19
plugins/tiddlywiki/markdown/settings.tid
Normal file
19
plugins/tiddlywiki/markdown/settings.tid
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings
|
||||||
|
tags: $:/tags/ControlPanel/SettingsTab
|
||||||
|
caption: Markdown
|
||||||
|
|
||||||
|
These settings let you customise the behaviour of Markdown. See [[plugin|$:/plugins/tiddlywiki/markdown]] readme and config tab for more information.
|
||||||
|
|
||||||
|
''IMPORTANT:'' You must reload your wiki for changes to take effect.
|
||||||
|
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings/Markdown]]">
|
||||||
|
|
||||||
|
<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> >
|
||||||
|
|
||||||
|
!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link>
|
||||||
|
|
||||||
|
<$transclude/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</$list>
|
9
plugins/tiddlywiki/markdown/settings/breaks.tid
Normal file
9
plugins/tiddlywiki/markdown/settings/breaks.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings/breaks
|
||||||
|
tags: $:/tags/ControlPanel/Settings/Markdown
|
||||||
|
caption: Breaks
|
||||||
|
|
||||||
|
markdown-it library config: Convert `\n` in paragraphs into `<br>`
|
||||||
|
|
||||||
|
<$checkbox tiddler="$:/config/markdown/breaks" field="text" checked="true" unchecked="false">
|
||||||
|
[[Breaks|$:/config/markdown/breaks]]
|
||||||
|
</$checkbox>
|
9
plugins/tiddlywiki/markdown/settings/linkify.tid
Normal file
9
plugins/tiddlywiki/markdown/settings/linkify.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings/linkify
|
||||||
|
tags: $:/tags/ControlPanel/Settings/Markdown
|
||||||
|
caption: Linkify
|
||||||
|
|
||||||
|
markdown-it library config: Autoconvert URL-like text to links
|
||||||
|
|
||||||
|
<$checkbox tiddler="$:/config/markdown/linkify" field="text" checked="true" unchecked="false">
|
||||||
|
[[Linkify|$:/config/markdown/linkify]]
|
||||||
|
</$checkbox>
|
8
plugins/tiddlywiki/markdown/settings/quotes.tid
Normal file
8
plugins/tiddlywiki/markdown/settings/quotes.tid
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings/quotes
|
||||||
|
tags: $:/tags/ControlPanel/Settings/Markdown
|
||||||
|
caption: Quotes replacement
|
||||||
|
list-after: $:/plugins/tiddlywiki/markdown/settings/typographer
|
||||||
|
|
||||||
|
markdown-it library config: Double + single quotes replacement pairs, when [[typographer|$:/config/markdown/typographer]] is enabled.
|
||||||
|
|
||||||
|
|[[Quotes replacement|$:/config/markdown/quotes]]|<$edit-text tiddler="$:/config/markdown/quotes" tag="input"/> |
|
9
plugins/tiddlywiki/markdown/settings/renderWikiText.tid
Normal file
9
plugins/tiddlywiki/markdown/settings/renderWikiText.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings/renderWikiText
|
||||||
|
tags: $:/tags/ControlPanel/Settings/Markdown
|
||||||
|
caption: Enable WikiText
|
||||||
|
|
||||||
|
After Markdown is parsed, should any text elements be handed off to the ~WikiText parser for further processing?
|
||||||
|
|
||||||
|
<$checkbox tiddler="$:/config/markdown/renderWikiText" field="text" checked="true" unchecked="false">
|
||||||
|
[[Enable WikiText|$:/config/markdown/renderWikiText]]
|
||||||
|
</$checkbox>
|
@ -0,0 +1,7 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings/renderWikiTextPragma
|
||||||
|
tags: $:/tags/ControlPanel/Settings/Markdown
|
||||||
|
caption: Enabled WikiText parser rules
|
||||||
|
|
||||||
|
When handing off to the ~WikiText parser, what parser rules should it follow?
|
||||||
|
|
||||||
|
|[[Enabled WikiText parser rules|$:/config/markdown/renderWikiTextPragma]]|<$edit tiddler="$:/config/markdown/renderWikiTextPragma" class="tc-edit-texteditor" autoHeight="yes"/> |
|
9
plugins/tiddlywiki/markdown/settings/typographer.tid
Normal file
9
plugins/tiddlywiki/markdown/settings/typographer.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/markdown/settings/typographer
|
||||||
|
tags: $:/tags/ControlPanel/Settings/Markdown
|
||||||
|
caption: Typographer
|
||||||
|
|
||||||
|
markdown-it library config: Enable some language-neutral replacement + quotes beautification
|
||||||
|
|
||||||
|
<$checkbox tiddler="$:/config/markdown/typographer" field="text" checked="true" unchecked="false">
|
||||||
|
[[Typographer|$:/config/markdown/typographer]]
|
||||||
|
</$checkbox>
|
Loading…
Reference in New Issue
Block a user