A tumblelog CMS built on AJAX, PHP and MySQL.

set.js 1.9KB

1234567891011121314151617181920212223242526272829303132333435
  1. // ----------------------------------------------------------------------------
  2. // markItUp!
  3. // ----------------------------------------------------------------------------
  4. // Copyright (C) 2008 Jay Salvat
  5. // http://markitup.jaysalvat.com/
  6. // ----------------------------------------------------------------------------
  7. // Html tags
  8. // http://en.wikipedia.org/wiki/html
  9. // ----------------------------------------------------------------------------
  10. // Basic set. Feel free to add more tags
  11. // ----------------------------------------------------------------------------
  12. my_html = {
  13. nameSpace: "my_html", // Used to prevent multi-instances CSS conflict
  14. onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'},
  15. onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>\n'},
  16. onTab: {keepDefault:false, openWith:' '},
  17. markupSet: [
  18. {name:'Paragraph', openWith:'<p(!( class="[![Class]!]")!)>', closeWith:'</p>' },
  19. {separator:'---------------' },
  20. {name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
  21. {name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
  22. {name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
  23. {separator:'---------------' },
  24. {name:'Ul', openWith:'<ul>\n', closeWith:'</ul>\n' },
  25. {name:'Ol', openWith:'<ol>\n', closeWith:'</ol>\n' },
  26. {name:'Li', openWith:'<li>', closeWith:'</li>' },
  27. {separator:'---------------' },
  28. {name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
  29. {separator:'---------------' },
  30. {name:'Quote block', openWith:'<blockquote>\n', closeWith:'</blockquote>\n' },
  31. {name:'Code block', openWith:'<code>\n', closeWith:'</code>\n' },
  32. {separator:'---------------' },
  33. {name:'Clean', replaceWith:function(h) { return h.selection.replace(/<(.*?)>/g, "") } }
  34. ]
  35. }