标记设置问题

时间:2010-10-07 21:02:41

标签: jquery textile markitup

这是我在set.js中的设置。我基本上不想要H1-H3标签,图像等。所以我删除了这些行,但我的标记文本区域似乎不喜欢设置,并显示如下。我正在使用具有基本简单皮肤的纺织品套装。

此外,是否有图像的精简版本?

alt text

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]!]))!). '}
    ]
}

3 个答案:

答案 0 :(得分:0)

您实际上已删除按钮,仅保留图像背景。你也必须编辑css:

/* -------------------------------------------------------------------
// 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);
}

(原始版本:http://markitup.jaysalvat.com/examples/textile/

没有sprited版本AFAIK,但您可以自己创建一个: - )

答案 1 :(得分:0)

实际上,您只需要隐藏CSS文件中的按钮(使用display: none;)。不要修改JS文件以评论或删除项目;你可以只评论或删除分隔符

 {separator:'---------------' },

答案 2 :(得分:-2)

如果你想隐藏一些按钮,你应该改变的是CSS文件而不是JS设置文件。

.markItUp .markItUpButton1 a {
background-image:url(images/h1.png); 
display: none;}

只需设置display:none即可。