1.0.6 • Published 2 years ago

github-form-schema-html v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

GitHub Form Schema HTML

GitHub Form Schema HTML

npm version npm downloads License

GitHub Form Schema HTML for GitHub's form schema

Features

GitHub Form Schema HTML convert your GitHub Issue Template in a real HTML Form. (Schema)

  • Supported Types:
    • Markdown
    • Textarea
    • Input
    • Dropdown
    • Checkboxes
  • Primer CSS support
  • TypeScript support

Setup

yarn add github-form-schema-html # yarn
npm i github-form-schema-html # npm

Basic usage

<form>
  <div id="load"></div>
  <button class="btn" type="submit">Submit</button>
</form>
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

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0

2 years ago