@ebl-vue/editor-full 1.0.13 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebl-vue/editor-full",
3
- "version": "1.0.13",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "author": "lrj525@sina.com",
6
6
  "description": "结构化编辑器",
@@ -39,7 +39,6 @@
39
39
  "url": "ssh://git@git.jianguodata.com:9082/lirujin/ebl-vue.git"
40
40
  },
41
41
  "dependencies": {
42
- "@codexteam/ajax": "^4.2.0",
43
42
  "@editorjs/caret": "^1.0.3",
44
43
  "@editorjs/dom": "^1.0.1",
45
44
  "axios": "^1.13.2",
@@ -42,9 +42,7 @@ import Underline from "../../plugins/underline";
42
42
  import InlineCode from "../../plugins/inline-code";
43
43
  import Table from '../../plugins/table';
44
44
  import ImageTool from "../../plugins/imageTool";
45
- import Uploader from '@/plugins/imageTool/uploader';
46
-
47
-
45
+ import {ImageToolTune } from "../../plugins/imageResizeCrop";
48
46
 
49
47
  const EblEditorSettings: IEblEditorSettings | undefined = inject("EblEditorSettings");
50
48
 
@@ -63,7 +61,8 @@ interface Props {
63
61
  title: string,
64
62
  lastUpdateTime: string,
65
63
  data: OutputData,
66
- locale:any
64
+ locale: any,
65
+ userStore:any
67
66
  }
68
67
 
69
68
  const props = withDefaults(defineProps<Props>(), {
@@ -80,6 +79,7 @@ const props = withDefaults(defineProps<Props>(), {
80
79
 
81
80
  const title = ref(props.title);
82
81
  let editor: EditorJS | null = null;
82
+ const tunes = ['indent', 'blockAlignment'];
83
83
  onMounted(() => {
84
84
  const editorData=toRaw(props.data);
85
85
  editor = new EditorJS({
@@ -87,7 +87,7 @@ onMounted(() => {
87
87
  autofocus: true,
88
88
  defaultBlock: 'paragraph',
89
89
  placeholder: props.placeholder,
90
- tunes: ['indent', 'blockAlignment'],
90
+ tunes: tunes,
91
91
  tools: {
92
92
  inlineCode: InlineCode,
93
93
  underline: Underline,
@@ -167,7 +167,10 @@ onMounted(() => {
167
167
  image: {
168
168
  class: ImageTool,
169
169
  inlineToolbar: true,
170
+ tunes: tunes.concat(['imageResize']),
170
171
  config: {
172
+ types:".png,.jpeg,.jpg,.gif,.webp",
173
+ userStore: props.userStore,
171
174
  endpoints: {
172
175
  byFile: EblEditorSettings?.fileUploadEndpoint,
173
176
  byUrl: EblEditorSettings?.urlUploadEndpoint
@@ -182,6 +185,14 @@ onMounted(() => {
182
185
 
183
186
  }
184
187
  },
188
+ imageResize: {
189
+ class: ImageToolTune ,
190
+ config: {
191
+ resize: true,
192
+ crop: false
193
+ }
194
+ },
195
+
185
196
 
186
197
 
187
198
  },