diff options
author | Mike Tzou <Chocobo1@users.noreply.github.com> | 2020-03-17 01:01:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-16 10:01:50 -0700 |
commit | 525edb86c0e4286f0ce061bddd8c98e194f92dde (patch) | |
tree | 9a5da7d79110d38c30924c4413c04e531622cf0e /trypandoc/index.html | |
parent | 004907f4f229b4aff2ca9c2a96b694251b51cce9 (diff) | |
download | pandoc-525edb86c0e4286f0ce061bddd8c98e194f92dde.tar.gz |
trypandoc: Add checkbox for standalone option (#6189)
Diffstat (limited to 'trypandoc/index.html')
-rw-r--r-- | trypandoc/index.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/trypandoc/index.html b/trypandoc/index.html index ea7cacc2d..2b42ab179 100644 --- a/trypandoc/index.html +++ b/trypandoc/index.html @@ -32,8 +32,9 @@ function newpage() { var input = $("#text").val(); var from = $("#from").val(); var to = $("#to").val(); + var standalone = $("#standalone").is(':checked') ? "1" : "0"; var href = window.location.href; - window.location.href = href.replace(/([?].*)?$/,"?" + $.param({text: input, from: from, to: to})); + window.location.href = href.replace(/([?].*)?$/,"?" + $.param({text: input, from: from, to: to, standalone: standalone})); }; $(document).ready(function() { @@ -43,8 +44,10 @@ $(document).ready(function() { $("#from").val(from); var to = $.QueryString["to"] || "html"; $("#to").val(to); + var standalone = ($.QueryString["standalone"] === "1") ? "1" : "0" + $("#standalone").prop('checked', (standalone === "1")); if (text && text != "") { - $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text }, + $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text, standalone: standalone }, function(res) { $("#results").text(res.html); $("#version").text(res.version); @@ -116,6 +119,10 @@ $(document).ready(function() { <option value="twiki">TWiki</option> <option value="vimwiki">Vimwiki</option> </select> + <input type="checkbox" id="standalone" name="standalone"> + <label for="standalone">Generate standalone document + <a href="https://pandoc.org/MANUAL.html#option--standalone" target="_blank">(?)</a> + </label> <br/> <textarea id="text" maxlength="3000" rows="15"></textarea> </div> |