annotate static/js/markitup/sets/default/set.js @ 943:cf9918328c64

Haystack tweaks for Django 1.7.7. I had to upgrade to Haystack 2.3.1 to get it to work with Django 1.7.7. I also had to update the Xapian backend. But I ran into problems. On my laptop anyway (Ubuntu 14.0.4), xapian gets mad when search terms are greater than 245 chars (or something) when indexing. So I created a custom field that would simply omit terms greater than 64 chars and used this field everywhere I previously used a CharField. Secondly, the custom search form was broken now. Something changed in the Xapian backend and exact searches stopped working. Fortunately the auto_query (which I was using originally and broke during an upgrade) started working again. So I cut the search form back over to doing an auto_query. I kept the form the same (3 fields) because I didn't want to change the form and I think it's better that way.
author Brian Neal <bgneal@gmail.com>
date Wed, 13 May 2015 20:25:07 -0500
parents c78c6e007e61
children
rev   line source
bgneal@312 1 // ----------------------------------------------------------------------------
bgneal@312 2 // markItUp!
bgneal@312 3 // ----------------------------------------------------------------------------
bgneal@466 4 // Copyright (C) 2011 Jay Salvat
bgneal@312 5 // http://markitup.jaysalvat.com/
bgneal@312 6 // ----------------------------------------------------------------------------
bgneal@312 7 // Html tags
bgneal@312 8 // http://en.wikipedia.org/wiki/html
bgneal@312 9 // ----------------------------------------------------------------------------
bgneal@312 10 // Basic set. Feel free to add more tags
bgneal@312 11 // ----------------------------------------------------------------------------
bgneal@466 12 var mySettings = {
bgneal@312 13 onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'},
bgneal@312 14 onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>'},
bgneal@312 15 onTab: {keepDefault:false, replaceWith:' '},
bgneal@312 16 markupSet: [
bgneal@312 17 {name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
bgneal@312 18 {name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
bgneal@312 19 {name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
bgneal@312 20 {separator:'---------------' },
bgneal@466 21 {name:'Bulleted List', openWith:' <li>', closeWith:'</li>', multiline:true, openBlockWith:'<ul>\n', closeBlockWith:'\n</ul>'},
bgneal@466 22 {name:'Numeric List', openWith:' <li>', closeWith:'</li>', multiline:true, openBlockWith:'<ol>\n', closeBlockWith:'\n</ol>'},
bgneal@466 23 {separator:'---------------' },
bgneal@312 24 {name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
bgneal@312 25 {name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
bgneal@312 26 {separator:'---------------' },
bgneal@312 27 {name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
bgneal@312 28 {name:'Preview', className:'preview', call:'preview'}
bgneal@312 29 ]
bgneal@466 30 }