Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanschndr/github-form-schema-html
:trollface: Interpret the Syntax for GitHub's form schema and export a html form.
https://github.com/jonathanschndr/github-form-schema-html
github issue
Last synced: 23 days ago
JSON representation
:trollface: Interpret the Syntax for GitHub's form schema and export a html form.
- Host: GitHub
- URL: https://github.com/jonathanschndr/github-form-schema-html
- Owner: JonathanSchndr
- License: mit
- Created: 2022-08-29T11:09:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-15T06:58:41.000Z (about 2 years ago)
- Last Synced: 2024-09-20T00:44:49.656Z (about 2 months ago)
- Topics: github, issue
- Language: TypeScript
- Homepage: https://codesandbox.io/s/example-github-form-schema-html-7khslb
- Size: 231 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![GitHub Form Schema HTML](./banner.jpg)
# GitHub Form Schema HTML
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]> GitHub Form Schema HTML for [GitHub's form schema](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)
- [✨ Release Notes](https://github.com/JonathanSchndr/github-form-schema-html/releases)
- [🔴 Demo](https://codesandbox.io/s/example-github-form-schema-html-7khslb)## Features
GitHub Form Schema HTML convert your GitHub Issue Template in a real HTML Form. [(Schema)](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)
- Supported Types:
- Markdown
- Textarea
- Input
- Dropdown
- Checkboxes
- [Primer CSS](https://primer.style/) support
- TypeScript support## Setup
```sh
yarn add github-form-schema-html # yarn
npm i github-form-schema-html # npm
```## Basic usage
```html
Submit```
```javascript
import { GitHubFormSchemaHtml } from 'github-form-schema-html';// basic
document.getElementById('load').innerHTML = new GitHubFormSchemaHtml({ yml: rawYml }).render();// with fetch (optional, if yml content need loaded before)
fetch('./form.yml').then(res => res.text()).then(rawYml => {
document.getElementById('load').innerHTML = new GitHubFormSchemaHtml({ yml: rawYml }).render();
})
```## Development
1. Clone this repository
2. Install dependencies using `yarn install` or `npm install`
3. Change vite.confg.js to `mode:'development'` / `minify:false` / `sourcemap:true`
4. Start development server using `yarn dev` or `npm run dev`## License
Copyright (c) 2022 Jonathan Schneider
[MIT License](./LICENSE)[npm-version-src]: https://img.shields.io/npm/v/github-form-schema-html/latest.svg
[npm-version-href]: https://npmjs.com/package/github-form-schema-html
[npm-downloads-src]: https://img.shields.io/npm/dt/github-form-schema-html.svg
[npm-downloads-href]: https://npmjs.com/package/github-form-schema-html
[license-src]: https://img.shields.io/npm/l/github-form-schema-html.svg
[license-href]: https://npmjs.com/package/github-form-schema-html