
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
本项目整合了新版 CKEditor 5 到Django. 老版本django-ckeditor 仍然在使用CKEditor 4.
根据 ckeditor.com官方说明,CKEditor 5是一个你没有用过的船新版本。
整体上仍然使用 django-ckeditor项目的架构。不同点是:
static/ckeditor5
包含最新的CKEditor 5经典编辑器(版本会随时更新,尽量与官方同步),CKEditor 5下载.extraPlugins
,老的一些插件,如代码插入编辑,目前不可以使用,需要其他方案。static/ckeditor5/ckeditor-init.js
部分代码, 在 initialiseCKEditor
方法里:
ClassicEditor.create
来初始化创建编辑器,而不是用4的 CKEDITOR.replace
pip install django-ckeditor5
升级 pip install django-ckeditor5 -U
github pip install git+https://github.com/n37r06u3/django-ckeditor5
添加app
INSTALLED_APPS = [
...
'ckeditor5'
]
基础配置
CKEDITOR5_CONFIGS = {
'default': {
'toolbar': ["undo", "redo", "bold", "italic", "blockQuote", "imageTextAlternative", "imageUpload", "heading",
"imageStyle:full", "imageStyle:side", "link", "numberedList", "bulletedList"],
'height': '300px',
'width': '100%',
},
}
模型定义
from ckeditor5.fields import RichTextField
添加插件 https://www.npmjs.com/package/ckeditor5-code-block
下载源码解压 cd ckeditor5_demo
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
https://github.com/django-ckeditor/django-ckeditor
https://ckeditor.com/ckeditor-4/
https://github.com/pancodia/django-ckeditor5
https://ckeditor.com/ckeditor-5/
20190304 - v0.0.1 初始化项目 CKEditor 5集成v11.0.1, 新版本django2.1.7测试可用
20190305 - v0.0.2 添加demo
20190306 - v0.0.3 添加大小配置
20190306 - v0.0.4 ckeditor5-build-classic11.0.1到v12.0.0 添加 https://www.npmjs.com/package/ckeditor5-code-block
添加图片上传插件
添加html源码查看插件
完善安装说明
FAQs
Django CKEditor 5 集成
We found that django-ckeditor5 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.