Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samclarke/SCEditor
A lightweight HTML and BBCode WYSIWYG editor
https://github.com/samclarke/SCEditor
bbcode bbcode-editor contenteditable editor html-editor javascript sceditor wysiwyg wysiwyg-editor wysiwyg-html-editor
Last synced: about 2 months ago
JSON representation
A lightweight HTML and BBCode WYSIWYG editor
- Host: GitHub
- URL: https://github.com/samclarke/SCEditor
- Owner: samclarke
- License: other
- Created: 2011-07-18T16:46:44.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-07-26T21:27:10.000Z (5 months ago)
- Last Synced: 2024-10-02T00:06:18.863Z (3 months ago)
- Topics: bbcode, bbcode-editor, contenteditable, editor, html-editor, javascript, sceditor, wysiwyg, wysiwyg-editor, wysiwyg-html-editor
- Language: JavaScript
- Homepage: http://www.sceditor.com/
- Size: 8.69 MB
- Stars: 659
- Watchers: 35
- Forks: 188
- Open Issues: 188
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.txt
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# [SCEditor](http://www.sceditor.com/)
[![Build Status](https://github.com/samclarke/SCEditor/workflows/Node.js%20CI/badge.svg)](https://travis-ci.org/samclarke/SCEditor)
[![SemVer](http://img.shields.io/:semver-✓-brightgreen.svg)](http://semver.org)
[![License](http://img.shields.io/npm/l/sceditor.svg)](https://github.com/samclarke/SCEditor/blob/master/LICENSE.md)A lightweight WYSIWYG BBCode and XHTML editor.
[![SCEditor preview](https://cdn.rawgit.com/samclarke/SCEditor/49c696b8/preview.svg)](https://www.sceditor.com/)
For more information visit [sceditor.com](http://www.sceditor.com/)
## Usage
Include the SCEditor JavaScript:
```html
```
Then to convert a textarea into SCEditor, simply do:
```js
var textarea = document.getElementById('id-of-textarea');sceditor.create(textarea, {
format: 'xhtml',
style: 'minified/themes/content/default.min.css'
});
```or for a BBCode WYSIWYG editor do:
```js
var textarea = document.getElementById('id-of-textarea');sceditor.create(textarea, {
format: 'bbcode',
style: 'minified/themes/content/default.min.css'
});
```Finally, to get the contents of the editor:
```js
var textarea = document.getElementById("id-of-textarea");sceditor.instance(textarea).val();
```## Options
For a full list of options, see the [options documentation](http://www.sceditor.com/documentation/options/).
## Building and testing
You will need [Grunt](http://gruntjs.com/) installed to run the build/tests. To install Grunt run:
```bash
npm install -g grunt-cli
```Next, to install the SCEditor dev dependencies run:
```bash
npm install
```That's it! You can now build and test SCEditor with the following commands:
```bash
# Minify the JS and convert the LESS to CSS
grunt build# Run the linter, unit tests and coverage
grunt test# Creates the final distributable ZIP file
grunt release
```You can also run the dev server to test changes without having to do a full
build by running:```bash
npm run dev
```and then going to http://localhost:9000/tests/
## Contribute
Any contributions and/or pull requests would be welcome.
Themes, translations, bug reports, bug fixes and donations are greatly appreciated.
## Donate
If you would like to make a donation you can via
[PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AVJSF5NEETYYG)
or via [Flattr](http://flattr.com/thing/400345/SCEditor)## License
SCEditor is licensed under the [MIT](/LICENSE.md) license:
Copyright (C) 2011 - 2017 Sam Clarke and contributors – sceditor.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Credits
**Nomicons: The Full Monty Emoticons by:**
Oscar Gruno, aka Nominell v. 2.0 -> [email protected]
Andy Fedosjeenko, aka Nightwolf -> [email protected]**Icons by:**
Mark James (http://www.famfamfam.com/lab/icons/silk/)
Licensed under the [Creative Commons CC-BY license](http://creativecommons.org/licenses/by/3.0/).