{"id":13453301,"url":"https://github.com/madebymany/sir-trevor-js","last_synced_at":"2025-04-28T15:33:50.734Z","repository":{"id":46266972,"uuid":"5311424","full_name":"madebymany/sir-trevor-js","owner":"madebymany","description":"Rich content editing entirely re-imagined for the web","archived":false,"fork":false,"pushed_at":"2024-06-10T11:39:09.000Z","size":14517,"stargazers_count":4506,"open_issues_count":51,"forks_count":396,"subscribers_count":122,"default_branch":"master","last_synced_at":"2025-04-09T01:20:55.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://madebymany.github.io/sir-trevor-js/","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/madebymany.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-06T07:50:15.000Z","updated_at":"2025-04-06T15:06:07.000Z","dependencies_parsed_at":"2024-06-18T15:21:09.723Z","dependency_job_id":"01a70716-9248-4089-96e5-50ba4717991f","html_url":"https://github.com/madebymany/sir-trevor-js","commit_stats":null,"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madebymany%2Fsir-trevor-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madebymany%2Fsir-trevor-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madebymany%2Fsir-trevor-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madebymany%2Fsir-trevor-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madebymany","download_url":"https://codeload.github.com/madebymany/sir-trevor-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251339057,"owners_count":21573660,"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":[],"created_at":"2024-07-31T08:00:37.710Z","updated_at":"2025-04-28T15:33:50.678Z","avatar_url":"https://github.com/madebymany.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","WYSIWYG-alike","类似 WYSIWYG","others","📦 Legacy \u0026 Inactive Projects","Web Development"],"sub_categories":[],"readme":"# Sir Trevor\n\n[![Build Status](https://travis-ci.org/madebymany/sir-trevor-js.png?branch=master)](https://travis-ci.org/madebymany/sir-trevor-js/)\n\nConceived by [Andrew Sprinz](http://github.com/andrewsprinz). Maintained by [Chris Bell](http://github.com/cjbell88) \u0026 [Andrew Walker](http://github.com/ninjabiscuit).\n\n## Upgrade guide from v0.5\n\n- [Changelog](https://github.com/madebymany/sir-trevor-js/blob/master/CHANGELOG.md)\n- Migration docs [0.4-0.5](https://github.com/madebymany/sir-trevor-js/blob/master/docs/migrations/0.4-0.5.md), [0.5-0.6](https://github.com/madebymany/sir-trevor-js/blob/master/docs/migrations/0.5-0.6.md)\n\n### Quick start\n\nThe recomended way to install Sir Trevor in your project is using npm. This will install all the files required in the `build` directory for the module.\n\n```\nnpm install sir-trevor\n```\n\nNote: Sir Trevor is distributed combined with its dependencies. If you wish to modify Sir Trevor you will want to clone the repository and use the [Compiling instructions](#compiling) below.\n\nHTML\n\n```html\n\u003cform\u003e\u003ctextarea class=\"js-st-instance\"\u003e\u003c/textarea\u003e\u003c/form\u003e\n```\n\nJavascript\n\n```js\nimport SirTrevor from \"sir-trevor\";\n\nconst editor = new SirTrevor.Editor({\n  el: document.querySelector(\".js-st-instance\"),\n  defaultType: \"Text\",\n  iconUrl: \"build/sir-trevor-icons.svg\"\n});\n```\n\n### Full docs\n\n[http://madebymany.github.io/sir-trevor-js/docs.html]\n\n### Plain JS\n\n- [Download the latest release](https://github.com/madebymany/sir-trevor-js/zipball/master)\n- ...or clone the repo: `git clone git://github.com/madebymany/sir-trevor-js.git`\n\n### Implementations\n\n1. [Sir Trevor Rails](http://github.com/madebymany/sir-trevor-rails)\n2. [Umbraco 7](https://github.com/mindrevolution/SirTrevor-for-Umbraco), [Umbraco 6](http://our.umbraco.org/projects/backoffice-extensions/skybrud-sir-trevor-editor)\n3. [CakePHP](http://github.com/martinbean/cakephp-sir-trevor-plugin)\n4. [Wordpress](https://github.com/neyre/sir-trevor-wp), [Wordpress](https://github.com/raffij/sir-trevor-wordpress)\n5. [Laravel](https://github.com/caouecs/Laravel4-SirTrevorJS)\n6. [Django](https://github.com/philippbosch/django-sirtrevor)\n7. [Yii Framework](https://github.com/DrMabuse23/yii2-sir-trevor-js)\n8. [Symfony2](https://github.com/EDSI-Tech/SirTrevorBundle)\n\n## Custom blocks\n\nWe are keeping a list of [custom block repos here](https://github.com/madebymany/sir-trevor-js/wiki/Custom-blocks). See the documentation to find out more about [adding your own block types](http://madebymany.github.io/sir-trevor-js/docs.html#4).\n\n## Browser support\n\nSir Trevor is only tested on the following modern browsers:\n\n- IE11+ (https://github.com/madebymany/sir-trevor-js/tree/ie-support)\n- Chrome 51+\n- Safari 9+\n- Firefox 47+\n\nECMAScript 6 shims are bundled in by default; if the platform you wish to run on doesn't support ECMAScript 5 APIs you'll need to shim those yourself.\n\nSir Trevor uses [The Guardian's scribe](https://github.com/guardian/scribe) for rich text editing. Double check their [browser support](https://github.com/guardian/scribe#browser-support) if your application relies on full RTE support.\n\n## Contributing\n\nSee the [roadmap](https://github.com/madebymany/sir-trevor-js/wiki/Roadmap) and read a little about [the philosophy](https://github.com/madebymany/sir-trevor-js/wiki/Philosophy) guiding development.\n\n### Customising the way it looks\n\nWe use [Sass](http://sass-lang.com/) for our styles, if you'd like to change the default styling please fork the repository and make changes to the Sass before recompiling.\n\n### Customising blocks\n\nBlock Types can also easily be added to the `SirTrevor.Blocks` object. You can also override the default block types (Text, Image, Tweet, Video, Quote, Heading \u0026 List) at any time. See the documentation to find out more about [adding your own block types](http://madebymany.github.io/sir-trevor-js/docs.html#4).\n\n### Compiling\n\nTests are run as part of compilation process, which require `chromedriver` to be installed on\nthe machine where you are running the compilation. If you're running Homebrew on OSX this can\nbe installed via `brew install chromedriver`.\n\nBefore getting started please be sure to install the necessary dependencies via npm:\n\n`$ npm install`\n\nWhen completed, we have a couple of preset scripts:\n\n`$ npm run dev`\n\nThis compiles for development, and watches source files to recompile when you change something.\n\n`$ npm test`\n\nRuns the linter and test suite, just like the CI server does.\n\n`$ npm run dist`\n\nConcatenates scripts, compiles the Sass, runs the Jasmine tests and minifies the project.\n\nPlease ensure any pull requests have relevant Jasmine tests (where applicable).\n\n## Current browser support tests\n\nmatrix:\n\n- BROWSER_NAME='chrome' BROWSER_VERSION='51' PLATFORM='OSX 10.10'\n- BROWSER_NAME='chrome' BROWSER_VERSION='51' PLATFORM='Windows 7'\n- BROWSER_NAME='firefox' BROWSER_VERSION='46' PLATFORM='OSX 10.10'\n- BROWSER_NAME='firefox' BROWSER_VERSION='46' PLATFORM='Windows 7'\n\n## Building gh-pages docs\n\n```\ncd website\nnpm install\nbundle exec rake publish PROJECT_ROOT=./ ALLOW_DIRTY=true\n```\n\n## License\n\nSir Trevor is released under the MIT license:\n[opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadebymany%2Fsir-trevor-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadebymany%2Fsir-trevor-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadebymany%2Fsir-trevor-js/lists"}