jQuery.noConflict(); var wymeditor_inputs = []; var wymeditors_loaded = 0; var wymeditor_boot_options = { skin: 'refinery' , basePath: "/javascripts/wymeditor/" , wymPath: "/javascripts/wymeditor/jquery.refinery.wymeditor.js" , cssSkinPath: "/stylesheets/wymeditor/skins/" , jsSkinPath: "/javascripts/wymeditor/skins/" , langPath: "/javascripts/wymeditor/lang/" , iframeBasePath: '/' , toolsItems: [ {'name': 'Bold', 'title': 'Bold', 'css': 'wym_tools_strong'} ,{'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'} ,{'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'} ,{'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'} ,{'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': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'} ,{'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'} ] ,toolsHtml: "" ,toolsItemHtml: "
  • " + "" + WYMeditor.TOOL_TITLE + "" + "
  • " //containersItems will be appended after tools in postInit. , containersItems: [ {'name': 'h1', 'title':'Heading_1', 'css':'wym_containers_h1'} ,{'name': 'h2', 'title':'Heading_2', 'css':'wym_containers_h2'} ,{'name': 'h3', 'title':'Heading_3', 'css':'wym_containers_h3'} ,{'name': 'p', 'title':'Paragraph', 'css':'wym_containers_p'} ] , classesHtml: "
  • " , classesItemHtml: "
  • "+ WYMeditor.CLASS_TITLE+ "
  • " , classesItemHtmlMultiple: "
  • " + WYMeditor.CLASS_TITLE + "
  • " , classesItems: [{name:'text-align', rules:['left', 'center', 'right', 'justify'], join: '-'}, {name: 'image-align', rules:['left', 'right'], join: '-'}, {name: 'font-size', rules:['small','normal','large'], join: '-'}] , containersHtml: "" , containersItemHtml: "
  • " + "" + "
  • " , boxHtml: "
    " + "
    " + WYMeditor.TOOLS + WYMeditor.CONTAINERS + "
    " + "
    " + WYMeditor.HTML + WYMeditor.IFRAME + WYMeditor.STATUS + "
    " + "
    " , iframeHtml: "
    " + "" +"
    " , dialogImageHtml: "" , dialogLinkHtml: "" , dialogTableHtml: "
    " + "
    " + "" + "
    " + "" + "" + "
    " + "
    " + "" + "" + "
    " + "
    " + "" + "" + "
    " + "
    " + "" + " or " + "{Cancel}" + "
    " + "
    " + "
    " , dialogPasteHtml: "
    " + "
    " + "" + "
    " + "
    " + "
    " + "" + " or " + "{Cancel}" + "
    " + "
    " + "
    " , dialogPath: "/admin/dialogs/" , dialogFeatures: "?width=958&height=460&modal=true&titlebar=true&auto_size_content=true&draggable=true" , dialogInlineFeatures: "?width=600&height=320&modal=true&titlebar=true&auto_size_content=true&draggable=true" , dialogId: 'TB_window' , dialogHtml: "" + "" + "" + "" + "" + WYMeditor.DIALOG_TITLE + "" + "" + "" + "" + "
    " + WYMeditor.DIALOG_BODY + "
    " + "" , postInit: function(wym) { wym._iframe.style.height = wym._element.height() + "px"; wymeditors_loaded += 1; if(WYMeditor.INSTANCES.length == wymeditors_loaded){ WYMeditor.loaded(); } } }; // custom function added by us to hook into when all wymeditor instances on the page have finally loaded: WYMeditor.loaded = function(){}; jQuery(function() { wymeditor_inputs = jQuery('.wymeditor'); wymeditor_inputs.hide(); wymeditor_inputs.wymeditor(wymeditor_boot_options); });