1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00

Update MarkItUp

This commit is contained in:
Denis Shakhov 2013-04-12 19:58:50 +07:00
parent 2612eba6f3
commit e88e516e04
7 changed files with 248 additions and 183 deletions

View file

@ -1,9 +1,9 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin // markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.12 // v 1.1.x
// Dual licensed under the MIT and GPL licenses. // Dual licensed under the MIT and GPL licenses.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Copyright (C) 2007-2011 Jay Salvat // Copyright (C) 2007-2012 Jay Salvat
// http://markitup.jaysalvat.com/ // http://markitup.jaysalvat.com/
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
@ -26,13 +26,19 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
(function($) { (function($) {
$.fn.markItUp = function(settings, extraSettings) { $.fn.markItUp = function(settings, extraSettings) {
var options, ctrlKey, shiftKey, altKey; var method, params, options, ctrlKey, shiftKey, altKey; ctrlKey = shiftKey = altKey = false;
ctrlKey = shiftKey = altKey = false;
if (typeof settings == 'string') {
method = settings;
params = extraSettings;
}
options = { id: '', options = { id: '',
nameSpace: '', nameSpace: '',
root: '', root: '',
previewHandler: false,
previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes' previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes'
previewInElement: '',
previewAutoRefresh: true, previewAutoRefresh: true,
previewPosition: 'after', previewPosition: 'after',
previewTemplatePath: '~/templates/preview.html', previewTemplatePath: '~/templates/preview.html',
@ -60,6 +66,35 @@
}); });
} }
// Quick patch to keep compatibility with jQuery 1.9
var uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
var matched = uaMatch( navigator.userAgent );
var browser = {};
if (matched.browser) {
browser[matched.browser] = true;
browser.version = matched.version;
}
if (browser.chrome) {
browser.webkit = true;
} else if (browser.webkit) {
browser.safari = true;
}
return this.each(function() { return this.each(function() {
var $$, textarea, levels, scrollPosition, caretPosition, caretOffset, var $$, textarea, levels, scrollPosition, caretPosition, caretOffset,
clicked, hash, header, footer, previewWindow, template, iFrame, abort; clicked, hash, header, footer, previewWindow, template, iFrame, abort;
@ -73,6 +108,20 @@
options.previewParserPath = localize(options.previewParserPath); options.previewParserPath = localize(options.previewParserPath);
options.previewTemplatePath = localize(options.previewTemplatePath); options.previewTemplatePath = localize(options.previewTemplatePath);
if (method) {
switch(method) {
case 'remove':
remove();
break;
case 'insert':
markup(params);
break;
default:
$.error('Method ' + method + ' does not exist on jQuery.markItUp');
}
return;
}
// apply the computed path to ~/ // apply the computed path to ~/
function localize(data, inText) { function localize(data, inText) {
if (inText) { if (inText) {
@ -106,29 +155,29 @@
footer = $('<div class="markItUpFooter"></div>').insertAfter($$); footer = $('<div class="markItUpFooter"></div>').insertAfter($$);
// add the resize handle after textarea // add the resize handle after textarea
if (options.resizeHandle === true && $.browser.safari !== true) { if (options.resizeHandle === true && browser.safari !== true) {
resizeHandle = $('<div class="markItUpResizeHandle"></div>') resizeHandle = $('<div class="markItUpResizeHandle"></div>')
.insertAfter($$) .insertAfter($$)
.bind("mousedown", function(e) { .bind("mousedown.markItUp", function(e) {
var h = $$.height(), y = e.clientY, mouseMove, mouseUp; var h = $$.height(), y = e.clientY, mouseMove, mouseUp;
mouseMove = function(e) { mouseMove = function(e) {
$$.css("height", Math.max(20, e.clientY+h-y)+"px"); $$.css("height", Math.max(20, e.clientY+h-y)+"px");
return false; return false;
}; };
mouseUp = function(e) { mouseUp = function(e) {
$("html").unbind("mousemove", mouseMove).unbind("mouseup", mouseUp); $("html").unbind("mousemove.markItUp", mouseMove).unbind("mouseup.markItUp", mouseUp);
return false; return false;
}; };
$("html").bind("mousemove", mouseMove).bind("mouseup", mouseUp); $("html").bind("mousemove.markItUp", mouseMove).bind("mouseup.markItUp", mouseUp);
}); });
footer.append(resizeHandle); footer.append(resizeHandle);
} }
// listen key events // listen key events
$$.keydown(keyPressed).keyup(keyPressed); $$.bind('keydown.markItUp', keyPressed).bind('keyup', keyPressed);
// bind an event to catch external calls // bind an event to catch external calls
$$.bind("insertion", function(e, settings) { $$.bind("insertion.markItUp", function(e, settings) {
if (settings.target !== false) { if (settings.target !== false) {
get(); get();
} }
@ -138,9 +187,13 @@
}); });
// remember the last focus // remember the last focus
$$.focus(function() { $$.bind('focus.markItUp', function() {
$.markItUp.focused = this; $.markItUp.focused = this;
}); });
if (options.previewInElement) {
refreshPreview();
}
} }
// recursively build header with dropMenus from markupset // recursively build header with dropMenus from markupset
@ -159,28 +212,27 @@
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", 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;
}).click(function() { }).bind('click.markItUp', function(e) {
return false; e.preventDefault();
}).bind("focusin", function(){ }).bind("focusin.markItUp", function(){
//$$.focus(); $$.focus();
}).mouseup(function() { }).bind('mouseup', function() {
if (button.call) { if (button.call) {
eval(button.call)(); eval(button.call)();
} }
setTimeout(function() { markup(button) },1); setTimeout(function() { markup(button) },1);
return false; return false;
}).hover(function() { }).bind('mouseenter.markItUp', function() {
$('> ul', this).show(); $('> ul', this).show();
$(document).one('click', function() { // close dropmenu if click outside $(document).one('click', function() { // close dropmenu if click outside
$('ul ul', header).hide(); $('ul ul', header).hide();
} }
); );
}, function() { }).bind('mouseleave.markItUp', function() {
$('> ul', this).hide(); $('> ul', this).hide();
} }).appendTo(ul);
).appendTo(ul);
if (button.dropMenu) { if (button.dropMenu) {
levels.push(i); levels.push(i);
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); $(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
@ -248,13 +300,14 @@
block = openWith + placeHolder + closeWith; block = openWith + placeHolder + closeWith;
} else { } else {
string = string || selection; string = string || selection;
var lines = [string], blocks = []; var lines = [string], blocks = [];
if (multiline===true) {
if (multiline === true) {
lines = string.split(/\r?\n/); lines = string.split(/\r?\n/);
} }
for (var l=0; l < lines.length; l++) { for (var l = 0; l < lines.length; l++) {
line = lines[l]; line = lines[l];
var trailingSpaces; var trailingSpaces;
if (trailingSpaces = line.match(/ *$/)) { if (trailingSpaces = line.match(/ *$/)) {
@ -270,10 +323,12 @@
block = openBlockWith + block + closeBlockWith; block = openBlockWith + block + closeBlockWith;
return { block:block, return { block:block,
openBlockWith:openBlockWith,
openWith:openWith, openWith:openWith,
replaceWith:replaceWith, replaceWith:replaceWith,
placeHolder:placeHolder, placeHolder:placeHolder,
closeWith:closeWith closeWith:closeWith,
closeBlockWith:closeBlockWith
}; };
} }
@ -286,7 +341,6 @@
root:options.root, root:options.root,
textarea:textarea, textarea:textarea,
selection:(selection||''), selection:(selection||''),
selectionOuter:(selectionOuter||''),
caretPosition:caretPosition, caretPosition:caretPosition,
ctrlKey:ctrlKey, ctrlKey:ctrlKey,
shiftKey:shiftKey, shiftKey:shiftKey,
@ -311,9 +365,10 @@
lines[i] = ""; lines[i] = "";
} }
} }
string = { block:lines.join('\n')}; string = { block:lines.join('\n')};
start = caretPosition; start = caretPosition;
len = string.block.length + (($.browser.opera) ? n-1 : 0); len = string.block.length + ((browser.opera) ? n-1 : 0);
} else if (ctrlKey === true) { } else if (ctrlKey === true) {
string = build(selection); string = build(selection);
start = caretPosition + string.openWith.length; start = caretPosition + string.openWith.length;
@ -334,8 +389,8 @@
if ((selection === '' && string.replaceWith === '')) { if ((selection === '' && string.replaceWith === '')) {
caretOffset += fixOperaBug(string.block); caretOffset += fixOperaBug(string.block);
start = caretPosition + string.openWith.length; start = caretPosition + string.openBlockWith.length + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length; len = string.block.length - string.openBlockWith.length - string.openWith.length - string.closeWith.length - string.closeBlockWith.length;
caretOffset = $$.val().substring(caretPosition, $$.val().length).length; caretOffset = $$.val().substring(caretPosition, $$.val().length).length;
caretOffset -= fixOperaBug($$.val().substring(0, caretPosition)); caretOffset -= fixOperaBug($$.val().substring(0, caretPosition));
@ -370,14 +425,14 @@
// Substract linefeed in Opera // Substract linefeed in Opera
function fixOperaBug(string) { function fixOperaBug(string) {
if ($.browser.opera) { if (browser.opera) {
return string.length - string.replace(/\n*/g, '').length; return string.length - string.replace(/\n*/g, '').length;
} }
return 0; return 0;
} }
// Substract linefeed in IE // Substract linefeed in IE
function fixIeBug(string) { function fixIeBug(string) {
if ($.browser.msie) { if (browser.msie) {
return string.length - string.replace(/\r*/g, '').length; return string.length - string.replace(/\r*/g, '').length;
} }
return 0; return 0;
@ -397,7 +452,7 @@
function set(start, len) { function set(start, len) {
if (textarea.createTextRange){ if (textarea.createTextRange){
// quick fix to make it work on Opera 9.5 // quick fix to make it work on Opera 9.5
if ($.browser.opera && $.browser.version >= 9.5 && len == 0) { if (browser.opera && browser.version >= 9.5 && len == 0) {
return false; return false;
} }
range = textarea.createTextRange(); range = textarea.createTextRange();
@ -414,25 +469,12 @@
// get the selection // get the selection
function get() { function get() {
// get the selection by outer text
selectionOuter = '';
if(window.getSelection){
selectionOuter = window.getSelection().toString();
} else if(window.document.selection){
var sel = window.document.selection.createRange();
selectionOuter = sel.text || sel;
if(selectionOuter.toString) {
selectionOuter = selectionOuter.toString();
} else {
selectionOuter='';
}
}
textarea.focus(); textarea.focus();
scrollPosition = textarea.scrollTop; scrollPosition = textarea.scrollTop;
if (document.selection) { if (document.selection) {
selection = document.selection.createRange().text; selection = document.selection.createRange().text;
if ($.browser.msie) { // ie if (browser.msie) { // ie
var range = document.selection.createRange(), rangeCopy = range.duplicate(); var range = document.selection.createRange(), rangeCopy = range.duplicate();
rangeCopy.moveToElementText(textarea); rangeCopy.moveToElementText(textarea);
caretPosition = -1; caretPosition = -1;
@ -453,7 +495,11 @@
// open preview window // open preview window
function preview() { function preview() {
if (!previewWindow || previewWindow.closed) { if (typeof options.previewHandler === 'function') {
previewWindow = true;
} else if (options.previewInElement) {
previewWindow = $(options.previewInElement);
} else if (!previewWindow || previewWindow.closed) {
if (options.previewInWindow) { if (options.previewInWindow) {
previewWindow = window.open('', 'preview', options.previewInWindow); previewWindow = window.open('', 'preview', options.previewInWindow);
$(window).unload(function() { $(window).unload(function() {
@ -489,11 +535,13 @@
renderPreview(); renderPreview();
} }
function renderPreview() { function renderPreview() {
var phtml; var phtml;
if (options.previewParser && typeof options.previewParser === 'function') { if (options.previewHandler && typeof options.previewHandler === 'function') {
options.previewHandler( $$.val() );
} else if (options.previewParser && typeof options.previewParser === 'function') {
var data = options.previewParser( $$.val() ); var data = options.previewParser( $$.val() );
writeInPreview( localize(data, 1) ); writeInPreview(localize(data, 1) );
} else if (options.previewParserPath !== '') { } else if (options.previewParserPath !== '') {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
@ -521,7 +569,9 @@
} }
function writeInPreview(data) { function writeInPreview(data) {
if (previewWindow.document) { if (options.previewInElement) {
$(options.previewInElement).html(data);
} else if (previewWindow && previewWindow.document) {
try { try {
sp = previewWindow.document.documentElement.scrollTop sp = previewWindow.document.documentElement.scrollTop
} catch(e) { } catch(e) {
@ -542,7 +592,7 @@
if (e.type === 'keydown') { if (e.type === 'keydown') {
if (ctrlKey === true) { if (ctrlKey === true) {
li = $('a[accesskey="'+String.fromCharCode(e.keyCode)+'"]', header).parent('li'); li = $('a[accesskey="'+((e.keyCode == 13) ? '\\n' : String.fromCharCode(e.keyCode))+'"]', header).parent('li');
if (li.length !== 0) { if (li.length !== 0) {
ctrlKey = false; ctrlKey = false;
setTimeout(function() { setTimeout(function() {
@ -583,14 +633,19 @@
} }
} }
function remove() {
$$.unbind(".markItUp").removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
$$.data('markItUp', null);
}
init(); init();
}); });
}; };
$.fn.markItUpRemove = function() { $.fn.markItUpRemove = function() {
return this.each(function() { return this.each(function() {
var $$ = $(this).unbind().removeClass('markItUpEditor'); $(this).markItUp('remove');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
} }
); );
}; };

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

View file

@ -0,0 +1,30 @@
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2011 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags
// ----------------------------------------------------------------------------
var mySettings = {
onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'},
onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>'},
onTab: {keepDefault:false, replaceWith:' '},
markupSet: [
{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
{separator:'---------------' },
{name:'Bulleted List', openWith:' <li>', closeWith:'</li>', multiline:true, openBlockWith:'<ul>\n', closeBlockWith:'\n</ul>'},
{name:'Numeric List', openWith:' <li>', closeWith:'</li>', multiline:true, openBlockWith:'<ol>\n', closeBlockWith:'\n</ol>'},
{separator:'---------------' },
{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'}
]
}

View file

@ -2,25 +2,33 @@
// markItUp! // markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/ // By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/ // ------------------------------------------------------------------*/
.markItUp .editor-h4 a { background-image:url(images/h4.png); } .markItUp .markItUpButton1 a {
.markItUp .editor-h5 a { background-image:url(images/h5.png); } background-image:url(images/bold.png);
.markItUp .editor-h6 a { background-image:url(images/h6.png); } }
.markItUp .editor-bold a { background-image:url(images/bold.png); } .markItUp .markItUpButton2 a {
.markItUp .editor-italic a { background-image:url(images/italic.png); } background-image:url(images/italic.png);
.markItUp .editor-stroke a { background-image:url(images/stroke.png); } }
.markItUp .editor-underline a { background-image:url(images/underline.png); } .markItUp .markItUpButton3 a {
.markItUp .editor-quote a { background-image:url(images/quote.png); } background-image:url(images/stroke.png);
.markItUp .editor-code a { background-image:url(images/code.png); } }
.markItUp .editor-ul a { background-image:url(images/ul.png); }
.markItUp .editor-ol a { background-image:url(images/ol.png); }
.markItUp .editor-li a { background-image:url(images/li.png); }
.markItUp .editor-picture a { background-image:url(images/picture.png); } .markItUp .markItUpButton4 a {
.markItUp .editor-image a { background-image:url(images/image.png); } background-image:url(images/list-bullet.png);
.markItUp .editor-link a { background-image:url(images/link.png); } }
.markItUp .markItUpButton5 a {
background-image:url(images/list-numeric.png);
}
.markItUp .editor-clean a { background-image:url(images/clean.png); } .markItUp .markItUpButton6 a {
.markItUp .editor-preview a { background-image:url(images/preview.png); } background-image:url(images/picture.png);
.markItUp .editor-cut a { background-image:url(images/cut.png); } }
.markItUp .editor-video a { background-image:url(images/video.png); } .markItUp .markItUpButton7 a {
.markItUp .editor-user a { background-image:url(images/user.png); } background-image:url(images/link.png);
}
.markItUp .markItUpButton8 a {
background-image:url(images/clean.png);
}
.markItUp .preview a {
background-image:url(images/preview.png);
}

View file

@ -144,19 +144,4 @@
.wiki .markItUpEditor, .wiki .markItUpEditor,
.dotclear .markItUpEditor { .dotclear .markItUpEditor {
background-image:url(images/bg-editor-wiki.png); background-image:url(images/bg-editor-wiki.png);
} }

View file

@ -1,131 +1,118 @@
/* ------------------------------------------------------------------- /* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin // markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http: //markitup.jaysalvat.com/ // By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/ // ------------------------------------------------------------------*/
.markItUp a: link, .markItUp * {
.markItUp a: visited { color: #000; text-decoration: none; } margin:0px; padding:0px;
.markItUp { margin-bottom: 5px; } outline:none;
.markItUpContainer { font: 11px Verdana, Arial, Helvetica, sans-serif; } }
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
.markItUp {
width:700px;
margin:5px 0 5px 0;
}
.markItUpContainer {
font:11px Verdana, Arial, Helvetica, sans-serif;
}
.markItUpEditor { .markItUpEditor {
font: 12px "Courier New", Courier, monospace; font:12px 'Courier New', Courier, monospace;
padding: 5px; padding:5px;
height: 200px; width:690px;
line-height: 18px; height:320px;
overflow: auto; clear:both;
width: 100%; line-height:18px;
-moz-box-sizing: border-box; overflow:auto;
box-sizing: border-box;
border: 1px solid #C0CAD5;
} }
.markItUpPreviewFrame { .markItUpPreviewFrame {
overflow: auto; overflow:auto;
background-color: #FFF; background-color:#FFF;
border: 1px solid #eee; width:99.9%;
padding: 10px; height:300px;
height: 300px; margin:5px 0;
margin: 5px 0; }
font: 12px Tahoma, Arial, Helvetica, sans-serif; .markItUpFooter {
width:100%;
} }
.markItUpFooter { width: 100%; }
.markItUpResizeHandle { .markItUpResizeHandle {
overflow: hidden; overflow:hidden;
height: 8px; width:22px; height:5px;
background: url(images/handle.png) 50% 3px no-repeat; margin-left:auto;
cursor: n-resize; margin-right:auto;
background-image:url(images/handle.png);
cursor:n-resize;
} }
/***************************************************************************************/ /***************************************************************************************/
/* first row of buttons */ /* first row of buttons */
.markItUpHeader { .markItUpHeader ul li {
background: #eee; list-style:none;
padding: 5px; float:left;
border-top: 1px solid #c0cad5; position:relative;
border-left: 1px solid #c0cad5;
border-right: 1px solid #c0cad5;
} }
.markItUpHeader ul { .markItUpHeader ul li:hover > ul{
overflow: visible; display:block;
zoom: 1;
display: inline-block;
*display: inline; /* ie <= 7 */
} }
.markItUpHeader ul li { list-style: none; float: left; position: relative; margin-right: 6px; }
.markItUpHeader ul li: hover > ul{ display: block; }
.markItUpHeader ul .markItUpDropMenu { .markItUpHeader ul .markItUpDropMenu {
background: transparent url(images/menu.png) no-repeat 115% 50%; background:transparent url(images/menu.png) no-repeat 115% 50%;
margin-right: 5px; margin-right:5px;
} }
.markItUpHeader ul .markItUpDropMenu li { .markItUpHeader ul .markItUpDropMenu li {
margin-right: 0px; margin-right:0px;
} }
/* next rows of buttons */ /* next rows of buttons */
.markItUpHeader ul ul { .markItUpHeader ul ul {
display: none; display:none;
position: absolute; position:absolute;
top: 16px; left: 0px; top:18px; left:0px;
background: #eee; background:#FFF;
border: 1px solid #000; border:1px solid #000;
} }
.markItUpHeader ul ul li { .markItUpHeader ul ul li {
float: none; float:none;
border-bottom: 1px solid #000; border-bottom:1px solid #000;
} }
.markItUpHeader ul ul .markItUpDropMenu { .markItUpHeader ul ul .markItUpDropMenu {
background: #eee url(images/submenu.png) no-repeat 100% 50%; background:#FFF url(images/submenu.png) no-repeat 100% 50%;
} }
.markItUpHeader ul .markItUpSeparator { .markItUpHeader ul .markItUpSeparator {
margin: 0 6px 0 0; margin:0 10px;
width: 1px; width:1px;
height: 16px; height:16px;
overflow: hidden; overflow:hidden;
background-color: #CCC; background-color:#CCC;
} }
.markItUpHeader ul ul .markItUpSeparator { .markItUpHeader ul ul .markItUpSeparator {
width: auto; height: 1px; width:auto; height:1px;
margin: 0px; margin:0px;
} }
/* next rows of buttons */ /* next rows of buttons */
.markItUpHeader ul ul ul { .markItUpHeader ul ul ul {
position: absolute; position:absolute;
top: -1px; left: 150px; top:-1px; left:150px;
} }
.markItUpHeader ul ul ul li { .markItUpHeader ul ul ul li {
float: none; float:none;
} }
.markItUpHeader ul a { .markItUpHeader ul a {
display: block; display:block;
width: 16px; height: 16px; width:16px; height:16px;
text-indent: -10000px; text-indent:-10000px;
background-repeat: no-repeat; background-repeat:no-repeat;
margin: 0px; padding:3px;
margin:0px;
} }
.markItUpHeader ul ul a { .markItUpHeader ul ul a {
display: block; display:block;
padding-left: 0px; padding-left:0px;
text-indent: 0; text-indent:0;
width: 120px; width:120px;
padding: 5px 5px 5px 25px; padding:5px 5px 5px 25px;
background-position: 2px 50%; background-position:2px 50%;
color: #000;
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow:ellipsis;
} }
.markItUpHeader ul ul a:hover { .markItUpHeader ul ul a:hover {
background-color: #fff; color:#FFF;
background-color:#000;
} }
.markItUpPreviewFrame { }
.markItUpPreviewFrame p { margin-bottom: 18px; }
.markItUpPreviewFrame blockquote { background: #fafafa; padding: 10px 15px; color: #555; margin-bottom: 5px; clear: both; }
.markItUpPreviewFrame pre { background: #fafafa; border: 1px solid #dce6f0; margin-bottom: 10px; overflow: auto; padding: 5px 10px; }
.markItUpPreviewFrame ul { list-style-type: disc; margin-left: 17px; }
.markItUpPreviewFrame ol { list-style-type: decimal; margin-left: 22px; }
.markItUpPreviewFrame img[align="right"] { margin: 4px 0 5px 15px; }
.markItUpPreviewFrame img[align="left"] { margin: 4px 15px 10px 0; }