googlecodelabs / tools

Codelabs management & hosting tools
Apache License 2.0
4.21k stars 1.14k forks source link

Inline Survey from Markdown Source? #344

Open laughingbiscuit opened 5 years ago

laughingbiscuit commented 5 years ago

Hi all,

Any ideas how to generate an Inline Survey from a markdown source?

I can't seem to find an equivalent to https://github.com/googlecodelabs/tools/blob/master/FORMAT-GUIDE.md for markdown.

Thanks, Sean

barabo commented 4 years ago

I was able to do it (after reading through the claat source code) with an HTML block in my markdown that looks like this:

<dl><dt style="background-color:#cfe2f3;">Survey</dt>
<dd>
  <li>Example item 1</li>
  <li>Example item 2</li>
</dd></dl>

Which produces this survey: image

Hopefully this is what you were looking for.

chilang commented 4 years ago

It looks like as of https://github.com/googlecodelabs/tools/commit/8528251b7cd2a5ceee33e0920956b46a01a24d9d the survey input format for markdown has changed to something like this:

<form>
  <name>This is your last chance. Take the ...</name>
  <input type="radio" value="blue pill">
  <input type="radio" value="red pill">
</form>

which will result in a survey

codelabs-survey-rendering