Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 2.45 KB

README.md

File metadata and controls

40 lines (32 loc) · 2.45 KB

CKEditor 5 in ustc-course

本目录包含了 CKEditor 5 依赖的有关文件。目前编辑器版本为 40.2.0。

下载依赖文件

本项目使用 DLL 形式导入,因此需要下载大量 JS 文件,可以执行以下命令:

wget https://unpkg.com/[email protected]/build/ckeditor5-dll.js
wget https://unpkg.com/@ckeditor/[email protected]/build/editor-classic.js
wget https://unpkg.com/@ckeditor/[email protected]/build/essentials.js
wget https://unpkg.com/@ckeditor/[email protected]/build/autoformat.js
wget https://unpkg.com/@ckeditor/[email protected]/build/basic-styles.js
wget https://unpkg.com/@ckeditor/[email protected]/build/block-quote.js
wget https://unpkg.com/@ckeditor/[email protected]/build/easy-image.js
wget https://unpkg.com/@ckeditor/[email protected]/build/heading.js
wget https://unpkg.com/@ckeditor/[email protected]/build/image.js
wget https://unpkg.com/@ckeditor/[email protected]/build/indent.js
wget https://unpkg.com/@ckeditor/[email protected]/build/link.js
wget https://unpkg.com/@ckeditor/[email protected]/build/list.js
wget https://unpkg.com/@ckeditor/[email protected]/build/media-embed.js
wget https://unpkg.com/@ckeditor/[email protected]/build/paste-from-office.js
wget https://unpkg.com/@ckeditor/[email protected]/build/table.js
wget https://unpkg.com/@ckeditor/[email protected]/build/code-block.js
wget https://unpkg.com/@ckeditor/[email protected]/build/markdown-gfm.js
wget https://unpkg.com/@ckeditor/[email protected]/build/word-count.js
wget https://unpkg.com/@ckeditor/[email protected]/build/horizontal-line.js
wget https://unpkg.com/@isaul32/[email protected]/build/math.js
wget https://raw.githubusercontent.com/taoky/ckeditor5-file-upload/master/build/file-upload.js

文件上传 (ckeditor5-file-upload) 模块使用了 https://github.com/taoky/ckeditor5-file-upload 修改后的 DLL build(位于 build 目录下), 该文件针对 40.2.0 构建,如果需要其他版本,需要下载、修改 package.json 后使用 npm run dll:build 构建。

样式

CSS 样式从 https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html 取得,对于需要样式的 HTML 元素,需要添加 ck-content 类。

特别地,blockquote 样式的斜体字形被删除(调整为了 normal !important)。