Created
March 19, 2012 15:28
-
-
Save winhamwr/2116251 to your computer and use it in GitHub Desktop.
WYMeditor customization example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('#id_doc-html').wymeditor( | |
{ | |
jQueryPath: "https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js", | |
wymPath: "/site_media/lib/wymeditor/wymeditor/jquery.wymeditor.js", | |
toolsItems: "[ {'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'}, {'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'}, {'name': 'Superscript', 'title': 'Superscript', 'css': 'wym_tools_superscript'}, {'name': 'Subscript', 'title': 'Subscript', 'css': 'wym_tools_subscript'}, {'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'}, {'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'}, {'name': 'Indent', 'title': 'Indent', 'css': 'wym_tools_indent'}, {'name': 'Outdent', 'title': 'Outdent', 'css': 'wym_tools_outdent'}, {'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'}, {'name': 'Unlink', 'title': 'Unlink', 'css': 'wym_tools_unlink'}, {'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'}, {'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'}, {'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'}, {'name': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'} ]", | |
iframeBasePath: "/site_media/lib/wymeditor/wymeditor/iframe/pstat/", | |
basePath: "/site_media/lib/wymeditor/wymeditor/", | |
skinPath: "/site_media/lib/wymeditor/wymeditor/skins/pstat/", | |
html: "", | |
classesItems: "[ {'name': 'underline', 'title': 'Underline', 'expr': '*'}, {'name': 'highlight', 'title': 'Highlight', 'expr': '*'}, {'name': 'center', 'title': 'Center', 'expr': '*'}, {'name': 'fixed', 'title': 'Evenly-Spaced Table', 'expr': 'table'}, {'name': 'list-upper-alpha', 'title': 'List: A. B. C.', 'expr': 'ol'}, {'name': 'list-decimal', 'title': 'List: 1. 2. 3.', 'expr': 'ol'}, {'name': 'list-lower-alpha', 'title': 'List: a. b. c.', 'expr': 'ol'}, {'name': 'list-lower-roman', 'title': 'List: i. ii. iii.', 'expr': 'ol'} ]", | |
postInit: function(wym) { | |
wym.inlineStyler({}); | |
wym.spellcheck({}); | |
wym.specialChars({}); | |
wym.table({}); | |
scaleEditor(wym); | |
$(window).resize(function() { | |
scaleEditor(wym); | |
}); | |
var listPlugin = new ListPlugin({}, wym); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment