public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: user clickable checkbox?
Date: Thu, 19 Jan 2023 21:19:56 +0100	[thread overview]
Message-ID: <871qnqmg1t.fsf@zeitkraut.de> (raw)
In-Reply-To: <87pmbbmont.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>

Just for completeness, here's a slightly better version, already
placed in the YAML metadata:

    ---
    include-after: |
      ``` {=html}
      <script type="text/javascript">
        document.addEventListener('DOMContentLoaded', () => {
          document.querySelectorAll("input[disabled]")
                  .forEach(x => { x.disabled = false; });
        });
      </script>
      ```
    ---

    - [x] Done



Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:

> Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> writes:
>
>> Thanks Albert, but why is it disabled? That means I can't toggle it in the resulting web page.
>
> I don't know, actually. Maybe because toggling doesn't have a permanent
> effect? Not sure.
>
> You can add this to the HTML to enable the boxes programmatically:
>
> <script type="javascript">
> document.querySelectorAll("input[disabled]")
>         .forEach(x => { x.disabled = false; })
> </script>
>
>> On 1/18/23 15:47, Albert Krewinkel wrote:
>>> Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> writes:
>>> 
>>>> I'd like the HTML created via markdown to have checkboxes that I could click, as
>>>> the end user. I read some of #3051 and thought it likely that pandoc could
>>>> generate `<input type="checked"/>` from `[x]`, but I don't see a checked
>>>> extension in the documentation. Is it possible or forthcoming?
>>> It works in lists, but only there, and only with the `task_lists`
>>> extension enabled:
>>>      % echo '- [x] do it' | pandoc -f markdown+task_lists
>>>      <ul class="task-list">
>>>      <li><input type="checkbox" disabled="" checked="" />do it</li>
>>>      </ul>
>>> 
>
>
> -- 
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


  parent reply	other threads:[~2023-01-19 20:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 20:22 Joseph Reagle
     [not found] ` <005cdbc0-3b07-b54c-4a6c-78199afe7146-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2023-01-18 20:47   ` Albert Krewinkel
     [not found]     ` <87tu0nmuvt.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-18 21:30       ` Joseph Reagle
     [not found]         ` <9311682a-dbde-7898-660e-b83f5da11504-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2023-01-18 22:58           ` Albert Krewinkel
     [not found]             ` <87pmbbmont.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-19 12:39               ` Joseph Reagle
2023-01-19 20:19               ` Albert Krewinkel [this message]
     [not found]                 ` <871qnqmg1t.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-19 20:48                   ` Joseph Reagle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qnqmg1t.fsf@zeitkraut.de \
    --to=albert+pandoc-9eawchwdxg8hfhg+jk9f0w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).