new markitup version
32
styles/bootstrap/markitup/jquery.markitup.js
Normal file → Executable file
|
@ -45,6 +45,7 @@
|
||||||
previewParser: false,
|
previewParser: false,
|
||||||
previewParserPath: '',
|
previewParserPath: '',
|
||||||
previewParserVar: 'data',
|
previewParserVar: 'data',
|
||||||
|
previewParserAjaxType: 'POST',
|
||||||
resizeHandle: true,
|
resizeHandle: true,
|
||||||
beforeInsert: '',
|
beforeInsert: '',
|
||||||
afterInsert: '',
|
afterInsert: '',
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
// compute markItUp! path
|
// compute markItUp! path
|
||||||
if (!options.root) {
|
if (!options.root) {
|
||||||
$('script').each(function(a, tag) {
|
$('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) {
|
if (miuScript !== null) {
|
||||||
options.root = miuScript[1];
|
options.root = miuScript[1];
|
||||||
}
|
}
|
||||||
|
@ -202,7 +203,7 @@
|
||||||
$('li:hover > ul', ul).css('display', 'block');
|
$('li:hover > ul', ul).css('display', 'block');
|
||||||
$.each(markupSet, function() {
|
$.each(markupSet, function() {
|
||||||
var button = this, t = '', title, li, j;
|
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+'"' : '';
|
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
|
||||||
if (button.separator) {
|
if (button.separator) {
|
||||||
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
|
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
|
||||||
|
@ -211,16 +212,16 @@
|
||||||
for (j = levels.length -1; j >= 0; j--) {
|
for (j = levels.length -1; j >= 0; j--) {
|
||||||
t += levels[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
|
.bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click
|
||||||
return false;
|
return false;
|
||||||
}).bind('click.markItUp', function(e) {
|
}).bind('click.markItUp', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}).bind("focusin.markItUp", function(){
|
}).bind("focusin.markItUp", function(){
|
||||||
$$.focus();
|
$$.focus();
|
||||||
}).bind('mouseup', function() {
|
}).bind('mouseup', function(e) {
|
||||||
if (button.call) {
|
if (button.call) {
|
||||||
eval(button.call)();
|
eval(button.call)(e); // Pass the mouseup event to custom delegate
|
||||||
}
|
}
|
||||||
setTimeout(function() { markup(button) },1);
|
setTimeout(function() { markup(button) },1);
|
||||||
return false;
|
return false;
|
||||||
|
@ -537,18 +538,19 @@
|
||||||
|
|
||||||
function renderPreview() {
|
function renderPreview() {
|
||||||
var phtml;
|
var phtml;
|
||||||
|
var parsedData = $$.val();
|
||||||
|
if (options.previewParser && typeof options.previewParser === 'function') {
|
||||||
|
parsedData = options.previewParser(parsedData);
|
||||||
|
}
|
||||||
if (options.previewHandler && typeof options.previewHandler === 'function') {
|
if (options.previewHandler && typeof options.previewHandler === 'function') {
|
||||||
options.previewHandler( $$.val() );
|
options.previewHandler(parsedData);
|
||||||
} else if (options.previewParser && typeof options.previewParser === 'function') {
|
|
||||||
var data = options.previewParser( $$.val() );
|
|
||||||
writeInPreview(localize(data, 1) );
|
|
||||||
} else if (options.previewParserPath !== '') {
|
} else if (options.previewParserPath !== '') {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: options.previewParserAjaxType,
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
global: false,
|
global: false,
|
||||||
url: options.previewParserPath,
|
url: options.previewParserPath,
|
||||||
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
|
data: options.previewParserVar+'='+encodeURIComponent(parsedData),
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
writeInPreview( localize(data, 1) );
|
writeInPreview( localize(data, 1) );
|
||||||
}
|
}
|
||||||
|
@ -560,7 +562,7 @@
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
global: false,
|
global: false,
|
||||||
success: function(data) {
|
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() {
|
function remove() {
|
||||||
$$.unbind(".markItUp").removeClass('markItUpEditor');
|
$$.unbind(".markItUp").removeClass('markItUpEditor');
|
||||||
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
|
$$.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);
|
$$.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:'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...' },
|
{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
|
||||||
{separator:'---------------' },
|
{separator:'---------------' },
|
||||||
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } }/*,
|
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
|
||||||
{name:'Preview', className:'preview', call:'preview'}*/
|
{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;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
.markItUp {
|
.markItUp {
|
||||||
width:100%;
|
width:700px;
|
||||||
margin:5px 0 5px 0;
|
margin:5px 0 5px 0;
|
||||||
}
|
}
|
||||||
.markItUpContainer {
|
.markItUpContainer {
|
||||||
|
@ -20,9 +20,9 @@
|
||||||
}
|
}
|
||||||
.markItUpEditor {
|
.markItUpEditor {
|
||||||
font:12px 'Courier New', Courier, monospace;
|
font:12px 'Courier New', Courier, monospace;
|
||||||
padding:0px;
|
padding:5px;
|
||||||
width:100%;
|
width:690px;
|
||||||
_height:320px;
|
height:320px;
|
||||||
clear:both;
|
clear:both;
|
||||||
line-height:18px;
|
line-height:18px;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
|
|