如何从bootstrap-markdown配置自动显示按钮?

时间:2013-08-02 12:40:01

标签: javascript twitter-bootstrap browser

我正在使用精彩的编辑器bootstrap-markdown但是他们会显示下面显示的编辑按钮列表Edit Buttons

我想更改默认提醒按钮,该按钮会在您点击“添加网址”标记时显示。

1 个答案:

答案 0 :(得分:2)

您可以在770文件的行bootstrap-markdown.js中对此进行编辑(具体取决于您要执行的操作)。

你会在那里找到这个代码块:

name: 'groupLink',
data: [{
  name: 'cmdUrl',
  title: 'URL/Link',
  icon: 'icon icon-globe',
  callback: function(e){
    // Give [] surround the selection and prepend the link
    var chunk, cursor, selected = e.getSelection(), content = e.getContent(), link

    if (selected.length == 0) {
      // Give extra word
      chunk = 'enter link description here'
    } else {
      chunk = selected.text
    }

    link = prompt('Insert Hyperlink','http://')

如果此信息有用,请告知我们。