new markitup version
32
styles/bootstrap/markitup/jquery.markitup.js
Normal file → Executable file
|
@ -45,6 +45,7 @@
|
|||
previewParser: false,
|
||||
previewParserPath: '',
|
||||
previewParserVar: 'data',
|
||||
previewParserAjaxType: 'POST',
|
||||
resizeHandle: true,
|
||||
beforeInsert: '',
|
||||
afterInsert: '',
|
||||
|
@ -59,7 +60,7 @@
|
|||
// compute markItUp! path
|
||||
if (!options.root) {
|
||||
$('script').each(function(a, tag) {
|
||||
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
|
||||
var miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
|
||||
if (miuScript !== null) {
|
||||
options.root = miuScript[1];
|
||||
}
|
||||
|
@ -202,7 +203,7 @@
|
|||
$('li:hover > ul', ul).css('display', 'block');
|
||||
$.each(markupSet, function() {
|
||||
var button = this, t = '', title, li, j;
|
||||
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
|
||||
button.title ? title = (button.key) ? (button.title||'')+' [Ctrl+'+button.key+']' : (button.title||'') : title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
|
||||
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
|
||||
if (button.separator) {
|
||||
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
|
||||
|
@ -211,16 +212,16 @@
|
|||
for (j = levels.length -1; j >= 0; j--) {
|
||||
t += levels[j]+"-";
|
||||
}
|
||||
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
|
||||
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
|
||||
.bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click
|
||||
return false;
|
||||
}).bind('click.markItUp', function(e) {
|
||||
e.preventDefault();
|
||||
}).bind("focusin.markItUp", function(){
|
||||
$$.focus();
|
||||
}).bind('mouseup', function() {
|
||||
}).bind('mouseup', function(e) {
|
||||
if (button.call) {
|
||||
eval(button.call)();
|
||||
eval(button.call)(e); // Pass the mouseup event to custom delegate
|
||||
}
|
||||
setTimeout(function() { markup(button) },1);
|
||||
return false;
|
||||
|
@ -537,18 +538,19 @@
|
|||
|
||||
function renderPreview() {
|
||||
var phtml;
|
||||
var parsedData = $$.val();
|
||||
if (options.previewParser && typeof options.previewParser === 'function') {
|
||||
parsedData = options.previewParser(parsedData);
|
||||
}
|
||||
if (options.previewHandler && typeof options.previewHandler === 'function') {
|
||||
options.previewHandler( $$.val() );
|
||||
} else if (options.previewParser && typeof options.previewParser === 'function') {
|
||||
var data = options.previewParser( $$.val() );
|
||||
writeInPreview(localize(data, 1) );
|
||||
options.previewHandler(parsedData);
|
||||
} else if (options.previewParserPath !== '') {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
type: options.previewParserAjaxType,
|
||||
dataType: 'text',
|
||||
global: false,
|
||||
url: options.previewParserPath,
|
||||
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
|
||||
data: options.previewParserVar+'='+encodeURIComponent(parsedData),
|
||||
success: function(data) {
|
||||
writeInPreview( localize(data, 1) );
|
||||
}
|
||||
|
@ -560,7 +562,7 @@
|
|||
dataType: 'text',
|
||||
global: false,
|
||||
success: function(data) {
|
||||
writeInPreview( localize(data, 1).replace(/<!-- content -->/g, $$.val()) );
|
||||
writeInPreview( localize(data, 1).replace(/<!-- content -->/g, parsedData) );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -636,6 +638,12 @@
|
|||
function remove() {
|
||||
$$.unbind(".markItUp").removeClass('markItUpEditor');
|
||||
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
|
||||
|
||||
var relativeRef = $$.parent('div').parent('div.markItUp').parent('div');
|
||||
if (relativeRef.length) {
|
||||
relativeRef.replaceWith($$);
|
||||
}
|
||||
|
||||
$$.data('markItUp', null);
|
||||
}
|
||||
|
||||
|
|
0
styles/bootstrap/markitup/sets/default/images/bold.png
Normal file → Executable file
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 304 B |
0
styles/bootstrap/markitup/sets/default/images/clean.png
Normal file → Executable file
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 667 B |
0
styles/bootstrap/markitup/sets/default/images/image.png
Normal file → Executable file
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
0
styles/bootstrap/markitup/sets/default/images/italic.png
Normal file → Executable file
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 223 B |
0
styles/bootstrap/markitup/sets/default/images/link.png
Normal file → Executable file
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
0
styles/bootstrap/markitup/sets/default/images/list-bullet.png
Normal file → Executable file
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
0
styles/bootstrap/markitup/sets/default/images/list-numeric.png
Normal file → Executable file
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
0
styles/bootstrap/markitup/sets/default/images/picture.png
Normal file → Executable file
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 606 B |
0
styles/bootstrap/markitup/sets/default/images/preview.png
Normal file → Executable file
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
0
styles/bootstrap/markitup/sets/default/images/stroke.png
Normal file → Executable file
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
4
styles/bootstrap/markitup/sets/default/set.js
Normal file → Executable file
|
@ -24,7 +24,7 @@ var mySettings = {
|
|||
{name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
|
||||
{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
|
||||
{separator:'---------------' },
|
||||
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } }/*,
|
||||
{name:'Preview', className:'preview', call:'preview'}*/
|
||||
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
|
||||
{name:'Preview', className:'preview', call:'preview'}
|
||||
]
|
||||
}
|
||||
|
|
0
styles/bootstrap/markitup/sets/default/style.css
Normal file → Executable file
0
styles/bootstrap/markitup/skins/markitup/images/bg-container.png
Normal file → Executable file
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-bbcode.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-dotclear.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-html.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-json.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-markdown.png
Normal file → Executable file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-textile.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-wiki.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor-xml.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/bg-editor.png
Normal file → Executable file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
styles/bootstrap/markitup/skins/markitup/images/handle.png
Normal file → Executable file
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
0
styles/bootstrap/markitup/skins/markitup/images/menu.png
Normal file → Executable file
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 254 B |
0
styles/bootstrap/markitup/skins/markitup/images/submenu.png
Normal file → Executable file
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
0
styles/bootstrap/markitup/skins/markitup/style.css
Normal file → Executable file
0
styles/bootstrap/markitup/skins/simple/images/handle.png
Normal file → Executable file
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
0
styles/bootstrap/markitup/skins/simple/images/menu.png
Normal file → Executable file
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
0
styles/bootstrap/markitup/skins/simple/images/submenu.png
Normal file → Executable file
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
8
styles/bootstrap/markitup/skins/simple/style.css
Normal file → Executable file
|
@ -12,7 +12,7 @@
|
|||
text-decoration:none;
|
||||
}
|
||||
.markItUp {
|
||||
width:100%;
|
||||
width:700px;
|
||||
margin:5px 0 5px 0;
|
||||
}
|
||||
.markItUpContainer {
|
||||
|
@ -20,9 +20,9 @@
|
|||
}
|
||||
.markItUpEditor {
|
||||
font:12px 'Courier New', Courier, monospace;
|
||||
padding:0px;
|
||||
width:100%;
|
||||
_height:320px;
|
||||
padding:5px;
|
||||
width:690px;
|
||||
height:320px;
|
||||
clear:both;
|
||||
line-height:18px;
|
||||
overflow:auto;
|
||||
|
|