search

Home  >  Q&A  >  body text

javascript - 不使用npm安装simditor而直接引用相关的js文件,那么可以使用其功能吗?

不使用npm安装simditor而直接引用相关的js文件,那么可以使用其功能吗?

PHP中文网PHP中文网2894 days ago278

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-10 17:31:50

    理论上可以。

    reply
    0
  • PHP中文网

    PHP中文网2017-04-10 17:31:50

    当然可以,npm 安装最后也是引用对应的 js 文件,你到版本下载页下载最新的压缩包,按着官方文档的顺序依次引入就行

    <link rel="stylesheet" type="text/css" href="[style path]/simditor.css" />
    
    <script type="text/javascript" src="[script path]/jquery.min.js"></script>
    <script type="text/javascript" src="[script path]/module.js"></script>
    <script type="text/javascript" src="[script path]/hotkeys.js"></script>
    <script type="text/javascript" src="[script path]/uploader.js"></script>
    <script type="text/javascript" src="[script path]/simditor.js"></script>

    顺序不能乱,因为它们之间有依赖的先后关系,还有以下描述

    • Simditor is based on jQuery and module.js.

    • hotkeys.js is used to bind hotkeys.

    • uploader.js is related to uploading files. You don't need to import this file if you don't want the uploading feature.

    reply
    0
  • Cancelreply