// ---------------------------------------------------------------------------- // markItUp! // ---------------------------------------------------------------------------- // Copyright (C) 2008 Jay Salvat // http://markitup.jaysalvat.com/ // ---------------------------------------------------------------------------- myHtmlSettings = { nameSpace: "html", // Useful to prevent multi-instances CSS conflict onShiftEnter: { keepDefault:false, replaceWith:'
\n' }, onCtrlEnter: { keepDefault:false, openWith:'\n

', closeWith:'

\n' }, onTab: { keepDefault:false, openWith:' ' }, markupSet: [ {name:'| HEADING 2 | Select portion of text first. Click on this button to create heading.', key:'2', openWith:'

', closeWith:'

', placeHolder:'Heading, level 2' }, {separator:'---------------' }, {name:'| BOLD | Select portion of text first. Click on this button to make it look bold.', key:'B', openWith:'', closeWith:'' }, {name:'| ITALIC | Select portion of text first. Click on this button to make it look bold.', key:'I', openWith:'', closeWith:'' }, {name:'| STRIKE THROUGH | Select portion of text first. Click on this button to make it strike through.', key:'S', openWith:'', closeWith:'' }, {separator:'---------------' }, {name:'| UL | Click on this button to create unordered list opening and closing tag.', openWith:'\n' }, {name:'| LI | Select portion of text between <ul> and </ul> tags. Click on this button to make list item.', openWith:'
  • ', closeWith:'
  • ' }, {separator:'---------------' }, {name:'| LINK | Select portion of text first. Click on this button to create a link.', key:'L', openWith:'', closeWith:'', placeHolder:'Create link' }, {separator:'---------------' }, {name:'| QUOTES | Select portion of text first. Click on this button to create quotes.', openWith:'
    \n', closeWith:'
    \n' }, {separator:'---------------' }, {name:'| CODE BLOCK | Select portion of code first. Click on this button to create preformated code block.', openWith:'
    \n', closeWith:'
    \n' }, {name:'| ENCODE HTML SPECIAL CHARS | If pasted code contains special characters (<, >) it must be encoded first to enable save! Select portion of code first and click to Encode.', className:"encodechars", replaceWith:function( markItUp ) { c = document.createElement( 'div' ); c.appendChild( document.createTextNode( markItUp.selection ) ); return c.innerHTML; } }, {separator:'---------------' }, {name:'| CLEAN | Select portion of HTML formatted text first. Click on this button to clean up HTML code.', replaceWith:function(h) { return h.selection.replace(/<(.*?)>/g, "") } }, {separator:'---------------' }, {name:'| PREVIEW | Click on this button to preview your entry!', call:'preview', className:'preview' } ] }