Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A lightweight WYSIWYG BBCode and XHTML editor for converting textareas into rich-text editing areas.
SCEditor is a lightweight JavaScript WYSIWYG editor that converts a standard HTML textarea into a rich-text editing interface for BBCode or XHTML output. Developed by Sam Clarke and contributors, the project is distributed under the MIT license and runs entirely in the browser using the contenteditable API.
SCEditor is a dependency-free WYSIWYG editor that enhances a plain HTML textarea with a visual editing surface. It accepts a textarea element and configuration options, then provides a formatted output value that can be read back programmatically. The editor is built for two output formats: BBCode and XHTML, making it suitable for forums, CMSs, and any application that needs user-generated formatted content.
Include the default theme CSS, the minified editor script, and the BBCode and XHTML format scripts. Then call sceditor.create on the target textarea, passing options such as format and style. The textarea remains in sync with the editor; call sceditor.instance(textarea).val() to get the formatted output.
SCEditor is free and open source under the MIT license, so there are no licensing fees for personal or commercial use.
Yes, SCEditor is distributed under the MIT license, allowing free use in commercial and personal projects.
SCEditor supports BBCode and XHTML. You select the format via the format option when creating the editor.
Use sceditor.instance(textarea).val() to retrieve the current formatted content from the original textarea element.
The usage examples only include plain JavaScript with no framework dependency; the library's code examples use vanilla DOM calls and no external libraries are listed.
Run grunt build to minify JS and convert LESS to CSS, grunt test for linting and unit tests, and grunt release to create the distributable ZIP. For development, npm run dev starts a local server at http://localhost:9000/tests/.
