markdown编辑器增加cherryMarkdown

* 使用cherryMarkdown替换editorMd

* 支持历史&边栏

* 优化代码&支持html格式渲染为预览格式&保存主题配置

* 修复drawio异常

* 优化drawio异常改法

* 自定义提示面板主题颜色

* drawio增加样式,并且更新到最新版本

* 增加代码块复制功能&&修复drawio渲染图片过大&&drawio生成图片背景改为透明

* 恢复原有markdown编辑器,新增cherry markdown编辑器

* 修复复制功能异常

* 修复drawio偶尔无法编辑

---------

Co-authored-by: zhangsheng.93 <zhangsheng.93@bytedance.com>
This commit is contained in:
张胜
2023-07-03 09:41:27 +08:00
committed by GitHub
parent 048135a2d9
commit 21fe4b631a
386 changed files with 254574 additions and 581 deletions

View File

@@ -164,8 +164,8 @@ func (c *BookController) SaveBook() {
if !models.NewItemsets().Exist(itemId) {
c.JsonResult(6006, i18n.Tr(c.Lang, "message.project_space_not_exist"))
}
if editor != "markdown" && editor != "html" && editor != "new_html" {
editor = "markdown"
if editor != EditorMarkdown && editor != EditorCherryMarkdown && editor != EditorHtml && editor != EditorNewHtml {
editor = EditorMarkdown
}
book.BookName = bookName
@@ -174,6 +174,9 @@ func (c *BookController) SaveBook() {
book.Publisher = publisher
//book.Label = tag
book.Editor = editor
if editor == EditorCherryMarkdown {
book.Theme = "cherry"
}
book.HistoryCount = historyCount
book.IsDownload = 0
book.BookPassword = strings.TrimSpace(c.GetString("bPassword"))