public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* user clickable checkbox?
@ 2023-01-18 20:22 Joseph Reagle
       [not found] ` <005cdbc0-3b07-b54c-4a6c-78199afe7146-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph Reagle @ 2023-01-18 20:22 UTC (permalink / raw)
  To: pandoc-discuss

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?

https://github.com/jgm/pandoc/issues/3051

—Joseph

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/005cdbc0-3b07-b54c-4a6c-78199afe7146%40reagle.org.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user clickable checkbox?
       [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>
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2023-01-18 20:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user clickable checkbox?
       [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>
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph Reagle @ 2023-01-18 21:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Thanks Albert, but why is it disabled? That means I can't toggle it in the resulting web page.



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>
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user clickable checkbox?
       [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>
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2023-01-18 22:58 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user clickable checkbox?
       [not found]             ` <87pmbbmont.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2023-01-19 12:39               ` Joseph Reagle
  2023-01-19 20:19               ` Albert Krewinkel
  1 sibling, 0 replies; 7+ messages in thread
From: Joseph Reagle @ 2023-01-19 12:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

I appreciate the suggestion, but wonder if the default behavior can be changed?

You are right that the toggles aren't permanent, but even impermanent toggles would be helpful to me in a class or meeting where I'm using a page to go through things to discuss/do in an agenda (see attached). Real toggles would help me from missing something. 🙂


On 1/18/23 17:58, Albert Krewinkel wrote:
> 
> 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>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a074a128-ad47-1e49-3d7a-12096c2d9370%40reagle.org.

[-- Attachment #2: SCR-20230119-alo.png --]
[-- Type: image/png, Size: 15873 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user clickable checkbox?
       [not found]             ` <87pmbbmont.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  2023-01-19 12:39               ` Joseph Reagle
@ 2023-01-19 20:19               ` Albert Krewinkel
       [not found]                 ` <871qnqmg1t.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2023-01-19 20:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: user clickable checkbox?
       [not found]                 ` <871qnqmg1t.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2023-01-19 20:48                   ` Joseph Reagle
  0 siblings, 0 replies; 7+ messages in thread
From: Joseph Reagle @ 2023-01-19 20:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Thanks Albert. That works. I create an issue that checklists be enabled by default here:

https://github.com/jgm/pandoc/issues/8562



On 1/19/23 15:19, Albert Krewinkel wrote:
> 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
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-19 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 20:22 user clickable checkbox? 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
     [not found]                 ` <871qnqmg1t.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-19 20:48                   ` Joseph Reagle

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).