Skip to content

Commit

Permalink
feat: 增加插入draw.io功能;增加编辑draw.io机制;\n fix: 修复编辑图片尺寸时有可能受代码块语法影响的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsonliu committed Mar 26, 2023
1 parent 76acd94 commit e326b86
Show file tree
Hide file tree
Showing 332 changed files with 136,723 additions and 21 deletions.
2 changes: 2 additions & 0 deletions client/scripts/index-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ var cherry = new Cherry({
'color',
'header',
'|',
'drawIo',
'|',
'list',
{
insert: ['image', 'audio', 'video', 'link', 'hr', 'br', 'code', 'formula', 'toc', 'table', 'pdf', 'word'],
Expand Down
35 changes: 35 additions & 0 deletions examples/drawio_demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>draw.io demo</title>
<link rel="stylesheet" href="./drawio_demo/grapheditor.css">
<!-- <link rel="stylesheet" href="https://jgraph.github.io/drawio/src/main/webapp/mxgraph/css/common.css"> -->
</head>

<!-- geEditor 是draw.io需要的class -->
<body class="geEditor">
<!-- 加载draw.io需要的静态资源 begin -->
<script type="text/javascript" src="./drawio_demo/Init.js"></script>
<script type="text/javascript" src="./drawio_demo/lib/pako.min.js"></script>
<script type="text/javascript" src="./drawio_demo/lib/base64.js"></script>
<script type="text/javascript" src="./drawio_demo/jscolor/jscolor.js"></script>
<script type="text/javascript" src="./drawio_demo/lib/sanitizer.min.js"></script>
<script type="text/javascript" src="./drawio_demo/src/js/mxClient.min.js"></script>
<script type="text/javascript" src="./drawio_demo/EditorUi.js"></script>
<script type="text/javascript" src="./drawio_demo/Editor.js"></script>
<script type="text/javascript" src="./drawio_demo/Sidebar.js"></script>
<script type="text/javascript" src="./drawio_demo/Graph.js"></script>
<script type="text/javascript" src="./drawio_demo/Format.js"></script>
<script type="text/javascript" src="./drawio_demo/Shapes.js"></script>
<script type="text/javascript" src="./drawio_demo/Actions.js"></script>
<script type="text/javascript" src="./drawio_demo/Menus.js"></script>
<script type="text/javascript" src="./drawio_demo/Toolbar.js"></script>
<script type="text/javascript" src="./drawio_demo/Dialogs.js"></script>
<!-- 加载draw.io需要的静态资源 end -->

<script src="./scripts/drawio-demo.js"></script>
</body>

</html>
Loading

0 comments on commit e326b86

Please sign in to comment.