Here is my settings in set.js. I basically don't want the H1 - H3 tags, images etc. So I deleted those lines but my markitup text area appears to not like the settings and shows up like following. I am using the textile set wit开发者_C百科h a basic simple skin.
Also, is there a sprited version of the images?
mySettings = {
previewParserPath: '', // path to your Textile parser
onShiftEnter: {keepDefault:false, replaceWith:'\n\n'},
markupSet: [
{name:'Heading 4', key:'4', openWith:'h4(!(([![Class]!]))!). ', placeHolder:'Your title here...' },
{name:'Heading 5', key:'5', openWith:'h5(!(([![Class]!]))!). ', placeHolder:'Your title here...' },
{name:'Heading 6', key:'6', openWith:'h6(!(([![Class]!]))!). ', placeHolder:'Your title here...' },
{name:'Paragraph', key:'P', openWith:'p(!(([![Class]!]))!). '},
{separator:'---------------' },
{name:'Bold', key:'B', closeWith:'*', openWith:'*'},
{name:'Italic', key:'I', closeWith:'_', openWith:'_'},
{name:'Stroke through', key:'S', closeWith:'-', openWith:'-'},
{separator:'---------------' },
{name:'Bulleted list', openWith:'(!(* |!|*)!)'},
{name:'Numeric list', openWith:'(!(# |!|#)!)'},
{separator:'---------------' },
{name:'Link', openWith:'"', closeWith:'([![Title]!])":[![Link:!:http://]!]', placeHolder:'Your text to link here...' },
{separator:'---------------' },
{name:'Quotes', openWith:'bq(!(([![Class]!]))!). '}
]
}
You have actually deleted the buttons, only image backgrounds remained. You have to edit css too:
/* -------------------------------------------------------------------
// markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
}
.textile .markItUpButton1 a {
background-image:url(images/h4.png);
}
.textile .markItUpButton2 a {
background-image:url(images/h5.png);
}
.textile .markItUpButton3 a {
background-image:url(images/h6.png);
}
.textile .markItUpButton4 a {
background-image:url(images/paragraph.png);
}
.textile .markItUpButton5 a {
background-image:url(images/bold.png);
}
.textile .markItUpButton6 a {
background-image:url(images/italic.png);
}
.textile .markItUpButton7 a {
background-image:url(images/stroke.png);
}
.textile .markItUpButton8 a {
background-image:url(images/list-bullet.png);
}
.textile .markItUpButton9 a {
background-image:url(images/list-numeric.png);
}
.textile .markItUpButton10 a {
background-image:url(images/link.png);
}
.textile .markItUpButton11 a {
background-image:url(images/quotes.png);
}
(original version: http://markitup.jaysalvat.com/examples/textile/ )
No sprited version AFAIK, but you can create one by yourself :-)
In fact, you just need to hide buttons in the CSS file (using display: none;
). Don't modify the JS file to comment or remove items; you can just comment or remove separators
{separator:'---------------' },
If you want to hide some buttons, what you should change is the CSS file but not the JS settings file.
.markItUp .markItUpButton1 a {
background-image:url(images/h1.png);
display: none;}
Just set display: none is ok.
精彩评论