首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >markItUp bbcode编辑器,预览不渲染

markItUp bbcode编辑器,预览不渲染
EN

Stack Overflow用户
提问于 2013-02-05 00:00:43
回答 1查看 595关注 0票数 0

我正在使用MarkitUp的bbcode编辑器,但是我不知道如何使用预览系统。当我在编辑器上写东西时,我想要显示一个类似stackoverflow的预览。

这是指向MarkitUp的链接:http://markitup.jaysalvat.com/documentation/

下面是我尝试过的:

代码语言:javascript
复制
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', previewPosition: 'after'}
    ]
}

预览设置在底部,但不起作用;-(

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-29 04:30:53

我认为您需要在mySettings变量中设置previewParserPath。我相信默认值是: previewParserPath:“~/设置/bbcode/preview.php”,

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14690523

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档