cazary v1.2.3
Cazary
jQuery plugin of WYSIWYG editor that aims for fast, lightweight, stylish, customizable, cross-browser, and multi-language.
jQuery version
Supported browsers
- Internet Explorer: 8 or later
- Mozilla Firefox: Latest version
- Google Chrome: Latest version
- Opera: version 12(Presto based), 15(Blink based)
- Safari for Windows: version 5
- Safari for Mac: Latest version
Supported Languages
How to use
Traditional method
- Copy
dist
to public directory - Load the theme CSS
<link rel="stylesheet" type="text/css" href="dist/themes/flat/style.css" />
- Load jQuery and
cazary.min.js
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript" src="dist/cazary.min.js"></script>
- Write JavaScript like this:
$(function($)
{
// that's it!
$("textarea").cazary();
// initial mode: HTML
$("textarea").cazary({
mode: "html"
});
// full commands
$("textarea").cazary({
commands: "FULL"
});
});
see demo page
CommonJS method
- Install Cazary by simply typing
npm install cazary
- Copy
dist/themes
to public directory (*.js
is not necessary) - Load the theme CSS
- Write JavaScript like this:
// this returns a jQuery object!
var $ = require("cazary");
$(function($)
{
$("textarea").cazary();
});
Options
Commands
commands
option must be specified one of followings:- one of "pre-defined macros"
- any combination of space-separated commands or
|
(separator)
- set of commands can be array
- see below about pre-defined macros and commands
pre-defined macros
commands (inline styles)
name | description |
---|---|
fontname | set font name |
fontsize | set font size |
bold | set style to bold |
italic | set style to italic |
underline | set style to underline |
strikethrough | set style to strikethrough |
removeformat | remove all format |
forecolor | set foreground color |
backcolor | set background color |
superscript | set style to superscript |
subscript | set style to subscript |
commands (block styles)
name | description |
---|---|
justifyleft | align current block to left |
justifycenter | align current block to center |
justifyright | align current block to right |
justifyfull | justify current block |
indent | indent current block |
outdent | un-indent current block |
insertorderedlist | set current block to ordered list |
insertunorderedlist | set current block to un-ordered list |
commands (insertion / creation)
name | description |
---|---|
inserthorizontalrule | insert horizontal rule to current position |
insertimage | insert image to current position current position |
createlink | create link to selected text |
unlink | remove link of selected text |
commands (editing)
name | description |
---|---|
undo | undo command |
redo | undo the undone command |
source | toggle HTML/RTE mode |
Project page
http://github.com/shimataro/cazary
Documents for developers
Release note
2016-12-10 version 1.2.3 Using ECMAScript6 syntax Add
npm run update-packages
command2016-10-29 version 1.2.2 *
change
event refreshes WYSIWYG area2016-03-06 version 1.2.1 Generate
demo-legacy.html
andsrc/cazary-legacy.js
automatically Modularize Sass mixins * Equip documents2016-02-19 version 1.2.0 SVG toolbar icons (for HD screen) Changed directory structure
2015-11-22 version 1.1.2 Supports Portuguese/Brazilian Portuguese (by Luiz Eduardo Simões) build method:
npm run build
2015-11-07 version 1.1.1 *
require("cazary")
returns a jQuery object2015-11-06 version 1.1.0 Supports CommonJS. Translation data format to YAML. * Build by gulp.js.
2015-10-08 version 1.0.1 * Fixed Polish translation.
2015-10-06 version 1.0 * First release.
Recruitment
I'm looking for human resources. Please contact me in my GitHub page!
- translators - except English and Japanese (translate from English or Japanese)
- designers - please create cool themes!
Credits
- yuqianyumo - Introducing Cazary in website
- Paweł Klockiewicz - Polish Translation
- Luiz Eduardo Simões - Portuguese/Brazilian Portuguese Translation
- GNU FreeFont - "flat" theme uses FreeSans
- Brad Owen - Testing on Safari for Mac