github-form-schema-html
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i github-form-schema-html

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

522 kB

Total Files

9

Last publish

Collaborators

  • jonathanschndr