Skip to content

Commit

Permalink
fix:优化部分bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Five-great committed Nov 7, 2022
1 parent 4c69c97 commit 49c51fd
Show file tree
Hide file tree
Showing 22 changed files with 847 additions and 2,491 deletions.
1 change: 0 additions & 1 deletion __docs__/quickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ sort: 5
```
### NPM


#### 下载 tinymce-plugin
<codeGroup>
<codeGroupItem title="NPM" active>
Expand Down
17 changes: 8 additions & 9 deletions __docs__/tpImporatwordDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ title: 插件demo
<script src='/tinymce/tinymce.js'></script>
<script src="/tinymce/tinymce-plugin.js"></script>
<script src="https://unpkg.com/tinymce-plugin/langs/zh_CN.js"></script>
<script src="https://unpkg.com/tinymce-plugin/plugins/tpImportword/plugin.min.js"></script>
<script src="https://unpkg.com/tinymce-plugin/plugins/tpLayout/plugin.min.js"></script>
</head>
<body tp-page-height="298">
<div>
Expand All @@ -66,12 +66,12 @@ title: 插件demo
selector: 'textarea.tinymce',
language: 'zh_CN',
skeletonScreen: true,
plugins: 'code tpImportword autoresize',
toolbar: 'code tpImportword'
plugins: 'code tpLayout autoresize',
toolbar: 'code tpLayout'
});
var openPlugin=()=>{
tinymce.activeEditor.execCommand('mceTpImportword');
tinymce.activeEditor.execCommand('mceTpLayout');
}
</script>
</body>
Expand Down Expand Up @@ -101,7 +101,7 @@ title: 插件demo
import tinymce from "tinymce";
import "tinymce-plugin";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import "tinymce-plugin/plugins/tpLayout/plugin.js";
export default{
name: 'domeVue3',
components: { TinymceVue },
Expand All @@ -113,8 +113,8 @@ data(){
max_height: 700,
skeletonScreen: true,
base_url:'/tinymce',
plugins: 'code tpImportword preview autoresize',
toolbar: 'code tpImportword preview',
plugins: 'code tpLayout preview autoresize',
toolbar: 'code tpLayout preview',
}
}
Expand All @@ -141,7 +141,7 @@ data(){
<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import "tinymce-plugin/plugins/tpLayout/plugin.js";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
Expand Down Expand Up @@ -174,7 +174,6 @@ import ReactDOM from 'react-dom';
import tinymce from "tinymce";
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import { Editor } from '@tinymce/tinymce-react';
class ReactDemo extends React.Component{
Expand Down
20 changes: 13 additions & 7 deletions demo/demo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


import "tinymce/skins/ui/oxide/skin.min.css"
import "tinymce/skins/ui/oxide/content.min.css"
// import "tinymce/skins/ui/oxide/skin.min.css"
// import "tinymce/skins/ui/oxide/content.min.css"
import tinymce, { Editor } from "tinymce"
import "tinymce-plugin"
import "tinymce-plugin/langs/zh_CN"
Expand All @@ -28,10 +28,10 @@ import plugin from "../src/main"
tinymce.init({
selector: 'div#mytextarea',
menubar: 'file edit insert view format table tools help mymenubar',
skin: false,
// skin: false,
tp_i18n: true,
tp_i18n_langs: true,
content_css: false,
// content_css: false,
language: 'en',
external_plugins:{
image: "/tinymce/plugins/image/plugin.js"
Expand All @@ -41,10 +41,16 @@ import plugin from "../src/main"
mymenubar: {title: 'Extension', items: `${plugin.opt.registryName}`+' tpI18n' },
},
min_height:240,
object_resizing: 'img span.data-tp-logicflow',
// skeletonScreen: true,
plugins: `code ${plugin.opt.registryName}`,
toolbar: `code ${plugin.opt.registryName} image`,
base_url:"/tinymce",
plugins: `code ${plugin.opt.registryName} image imagetools`,
toolbar: `code ${plugin.opt.registryName} image imagetools`,
images_upload_handler: function (blobInfo, succFun, failFun) {
var file = blobInfo.blob();
var DOMURL = window.URL || window.webkitURL || window;
succFun(DOMURL.createObjectURL(file))
// succFun("https://github.com/five-great")
},
})
});
//@ts-ignore
Expand Down
Loading

0 comments on commit 49c51fd

Please sign in to comment.