Conceived by Andrew Sprinz. Maintained by Chris Bell & Andrew Walker.
Full documentation can be found here.
- Download the latest release
- ...or clone the repo:
git clone git://github.com/madebymany/sir-trevor-js.git
- ...or install with Bower
bower install sir-trevor-js
- Sir Trevor Rails
- Umbraco 7, Umbraco 6
- CakePHP
- Wordpress, Wordpress
- Laravel
- Django
- Yii Framework
- Symfony2
We are keeping a list of custom block repos here. See the documentation to find out more about adding your own block types.
Sir Trevor is only tested on the following modern browsers:
- IE11+
- Chrome 43+
- Safari 8+
- Firefox 40+
ECMAScript 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.
Sir Trevor uses The Guardian's scribe for rich text editing. Double check their browser support if your application relies on full RTE support.
It's up to you:
- Bring your own jQuery or Zepto (and have it put itself on
window.$
) and usesir-trevor.js
/sir-trevor.min.js
- Or if you're using Browserify yourself,
npm install sir-trevor
andrequire('sir-trevor')
it as you would expect.
See the roadmap and read a little about the philosophy guiding development.
We use Sass for our styles, if you'd like to change the default styling please fork the repository and make changes to the Sass before recompiling.
Block 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 & List) at any time. See the documentation to find out more about adding your own block types.
Tests are run as part of compilation process, which require chromedriver
to be installed on
the machine where you are running the compilation. If you're running Homebrew on OSX this can
be installed via brew install chromedriver
.
Before getting started please be sure to install the necessary dependencies via npm:
$ npm install
When completed, we have a couple of preset scripts:
$ npm run dev
This compiles for development, and watches source files to recompile when you change something.
$ npm test
Runs the linter and test suite, just like the CI server does.
$ npm run dist
Concatenates scripts, compiles the Sass, runs the Jasmine tests and minifies the project.
Please ensure any pull requests have relevant Jasmine tests (where applicable).
matrix:
- BROWSER_NAME='chrome' BROWSER_VERSION='44' PLATFORM='OSX 10.9'
- BROWSER_NAME='chrome' BROWSER_VERSION='44' PLATFORM='Windows 7'
- BROWSER_NAME='firefox' BROWSER_VERSION='40' PLATFORM='OSX 10.9'
- BROWSER_NAME='firefox' BROWSER_VERSION='40' PLATFORM='Windows 7'
- BROWSER_NAME='safari' BROWSER_VERSION='8' PLATFORM='OSX 10.10'
Sir Trevor is released under the MIT license: opensource.org/licenses/MIT