Sir Trevor ordered-list.js错误_未定义ordered-list.js:16

时间:2015-01-10 05:19:33

标签: sirtrevor

只需与Sir Trevor编辑器一起玩,找到一些可以使用的自定义块,对ordered-list.js有一些问题,代码在 https://github.com/madebymany/sir-trevor-blocks/blob/master/src/ordered-list.js

每当我点击" Ordered List"我收到此错误消息图标。 错误堆栈:

未捕获的ReferenceError:_未定义order-list.js:16
Sir Trevor.Blocks.OrderedList.SirTrevor.Block.extend.editorHTMLindex.js:4

Sir Trevor能够加载有序列表插件,因为我在使用它时会在选项中看到,当我点击Ordered List图标使用时会发生此错误。

任何人都可以指出我正确的方向,我是javascript的新手,并且一直在努力争取这一天......

有什么建议吗?

这是我加载脚本的方式



<script src="../node_modules/jquery/dist/jquery.js" type="text/javascript" charset="utf-8"></script>
  <script src="../build/sir-trevor.debug.js" type="text/javascript" charset="utf-8"></script>
  <script src="../locales/de.js" type="text/javascript" charset="utf-8"></script>
<script src="../build/ordered-list.js" type="text/javascript" charset="utf-8"></script>

  <script type="text/javascript" charset="utf-8">
    $(function(){
      SirTrevor.config.debug = true;
      SirTrevor.config.scribeDebug = true;
      SirTrevor.config.language = "en";

      SirTrevor.setBlockOptions("Text", {
        onBlockRender: function() {
          console.log("Text block rendered");
        }
      });

      window.editor = new SirTrevor.Editor({
        el: $('.sir-trevor'),
        blockTypes: [
            "OrderedList",
          "Heading",
          "Text",
          "List",
          "Quote",
          "Image",
          "Video",
          "Tweet"
        ]
      });

      $('form').bind('submit', function () {
        $('#st-json-debug').text(window.editor.store.toString(true));
        return false;
      });

    });
  </script>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

你需要Underscore.js。这就是错误的含义。加载它。