Socket
Socket
Sign inDemoInstall

xlink-editor

Package Overview
Dependencies
0
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xlink-editor

JavaScript Xlink web text editor.


Version published
Weekly downloads
142
increased by22.41%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Getting Started

使用npm package

npm i xlink-editor

在网站上使用xlink-editor:

<div id="editor">
  <p>This is the editor content.</p>
</div>
<script src="./node_modules/xlink-editor/ckeditor.js"></script>
<script>
  CKEDITOR.replace( 'editor' );
</script>

CKEditor4有自己的插件加载系统,可以参考使用ckeditor4-webpack-template GitHub template仓库配置webpack,它将node_modules/ckeditor4/所有必要的文件直接复制到dist/目录。加载ckeditor4的一个更好的方法是把它放到webpack构建之外,然后异步加载它。 CKEditor4加载所需的额外文件需引用线上或本地服务器上的路径。

使用cdn

从cdn加载xlink-editor脚本:

<div id="editor">
  <p>This is the editor content.</p>
</div>
<script src="https://cdn.jsdelivr.net/npm/xlink-editor@0.1.4/ckeditor.js"></script>
<script>
  CKEDITOR.replace( 'editor' );
</script>

使用Git submodule

当想把文件放在静态资源目录上访问时,项目使用git,并且希望集成xlink-editor, 建议将此仓库作为子模块submodule添加

Keywords

FAQs

Last updated on 31 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc