{"id":13555029,"url":"https://github.com/substance/forms","last_synced_at":"2025-10-05T12:27:47.688Z","repository":{"id":138803450,"uuid":"77458307","full_name":"substance/forms","owner":"substance","description":"Web forms with Substance.","archived":false,"fork":false,"pushed_at":"2017-05-12T18:31:26.000Z","size":66,"stargazers_count":14,"open_issues_count":3,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-04T03:32:43.591Z","etag":null,"topics":["editing","forms","html","javascript"],"latest_commit_sha":null,"homepage":"http://substance.io/forms","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/substance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-12-27T13:40:20.000Z","updated_at":"2020-10-03T15:40:28.000Z","dependencies_parsed_at":"2024-01-14T18:05:38.444Z","dependency_job_id":null,"html_url":"https://github.com/substance/forms","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substance%2Fforms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substance%2Fforms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substance%2Fforms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substance%2Fforms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/substance","download_url":"https://codeload.github.com/substance/forms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223903499,"owners_count":17222551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["editing","forms","html","javascript"],"created_at":"2024-08-01T12:03:00.183Z","updated_at":"2025-10-05T12:27:42.647Z","avatar_url":"https://github.com/substance.png","language":"JavaScript","readme":"# Substance Forms\n\nSubstance Forms is a JavaScript library for creating better web forms.\nYou can mark areas of the page as editable and access the contents with a\nsimple JavaScript API. You have full control over markup and styling, and you\ncan mix the rich text inputs with classic form elements.\n\nSee [the](http://substance.io/forms) [demos](http://substance.io/forms/comments.html).\n\nProject Status: Beta\n\n## Usage\n\nDownload the latest [release](https://github.com/substance/forms/releases) and use like shown below.\n\n```html\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cscript type=\"text/javascript\" src=\"substance-forms.js\"\u003e\u003c/script\u003e\n  \u003cstyle\u003e\n    /* FontAwesome is used to display the icons shown in the overlay */\n    @import 'lib/font-awesome/css/font-awesome.min.css';\n    /* Substance Forms looks best with a CSS reset */\n    @import 'substance/substance-reset.css';\n    /* Substance Forms UI styles */\n    @import 'substance-forms.css';\n  \u003c/style\u003e\n\u003c/head\u003e\n\u003cscript\u003e\n  var form\n  window.addEventListener('load', function() {\n    forms = new SubstanceForms()\n    /* Activate rich text editing */\n    forms.addRichTextArea('about', document.getElementById('about'), {\n      enabledPackages: ['heading', 'strong', 'emphasis', 'link', 'list', 'table']\n    })\n  })\n  function _onSubmit() {\n    let forms = window.substanceForms\n    let formData = {\n      about: forms.getHTML('about')\n    }\n    console.log('Form data', formData)\n  }\n\u003c/script\u003e\n\u003cbody\u003e\n  \u003c!-- The editable attribute marks editable areas --\u003e\n  \u003cdiv id=\"about\"\u003e\n    \u003cp\u003eTell us \u003cstrong\u003esomething\u003c/strong\u003e about \u003cem\u003eyou\u003c/em\u003e.\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cbutton onclick=\"_onSubmit()\"\u003eSubmit\u003c/button\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nFor a complete usage example see [here](examples/index.html). Learn advanced usage by inspecting the [comments example](examples/comments.html).\n\n## Development\n\nIf you want to contribute, you can set up a development environment like so:\n\n```\n$ git clone https://github.com/substance/forms.git\n$ npm install\n$ npm start\n```\n\nFor faster builds you can run:\n\n```\n$ npm run dev\n```\n\nBut then you need a browser that can run ES6 code natively.\n\n## Credits\n\nThis project is developed by [Substance](http://substance.io) in collaboration with the [University of California Curation Center](http://www.cdlib.org/services/uc3/index.html).\n","funding_links":[],"categories":["JavaScript","javascript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubstance%2Fforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubstance%2Fforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubstance%2Fforms/lists"}