Created
July 26, 2011 07:38
-
-
Save brikis98/1106204 to your computer and use it in GitHub Desktop.
Proposed syntax for a Markdown extension that would support form elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <label>Phones:</label> | |
| <input type="checkbox" name="phones" id="Android" value="Android"/><label for="Android">Android</label> | |
| <input type="checkbox" name="phones" id="iPhone" value="iPhone" checked="checked"/><label for="iPhone">iPhone</label> | |
| <input type="checkbox" name="phones" id="Blackberry" value="Blackberry" checked="checked"/><label for="Blackberry">Blackberry</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| phones = [] Android [x] iPhone [x] Blackberry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <label for="city">City:</label> | |
| <select id="city" name="city"> | |
| <option value="BOS">BOS</option> | |
| <option value="SFO">SFO</option> | |
| <option value="NYC" selected="selected">NYC</option> | |
| </select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| city = {BOS, SFO, (NYC)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <label for="zip-code" class="required-label">Zip code*:</label> | |
| <input type="text" name="zip-code" id="zip-code" class="required-input"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| zip code* = ________ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <label for="name">Name:</label> | |
| <input type="text" id="name" name="name"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name = ________ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@brikis98 Thanks a lot for this proposal! I just created a similar approach as plugin for markdown-it. Didn't fully follow the proposal in order to allow for more flexibility in adding attributes (e.g. id, required, selected, checked, class, data-*, ...) to the input elements: https://github.com/rajgoel/markdown-it-input