md-editor-v3 2.0.0-beta.1 → 2.0.0-beta.2
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/README.md +8 -4
- package/lib/MdEditor/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ mark and emoji extensions
|
|
|
108
108
|
|
|
109
109
|
> After v1.6.0, You can sort the toolbar as you like, split tools by `'-'`, the left and right toolbars are divided by `'='`!
|
|
110
110
|
|
|
111
|
-
> After v1.10.0, you can customize the toolbar. To display them, put index of `defToolbars` into `toolbars`(this is not standard), for more usage, please refer to[docs]().
|
|
111
|
+
> After v1.10.0, you can customize the toolbar. To display them, put index of `defToolbars` into `toolbars`(this is not standard), for more usage, please refer to [docs](https://imzbf.github.io/md-editor-v3/docs).
|
|
112
112
|
|
|
113
113
|
<details>
|
|
114
114
|
<summary>[StaticTextDefaultValue]</summary>
|
|
@@ -247,7 +247,7 @@ const handler = () => { console.log('NormalToolbar clicked!') }
|
|
|
247
247
|
| onSave | v:string | Save content event, `ctrl+s`and click button will be triggered also |
|
|
248
248
|
| onUploadImg | files:Array<File>, callback:Function | Upload picture event, when picture is uploading the modal will not close, please provide right urls to the callback function |
|
|
249
249
|
| onHtmlChanged | h:string | Compile markdown successful event, you can use it to get the html code |
|
|
250
|
-
| onGetCatalog | list: HeadList[] | Get
|
|
250
|
+
| onGetCatalog | list: HeadList[] | Get catalog of article |
|
|
251
251
|
|
|
252
252
|
## Config
|
|
253
253
|
|
|
@@ -410,6 +410,7 @@ They are used as attributes of the editor component, eg: `Editor.DropdownToolbar
|
|
|
410
410
|
- `onClick`: `(e: MouseEvent) => void`, necessary.
|
|
411
411
|
|
|
412
412
|
- **slots**
|
|
413
|
+
|
|
413
414
|
- `trigger`: `string | JSX.Element`, necessary, it is usually an icon, which is displayed on the toolbar.
|
|
414
415
|
|
|
415
416
|
### DropdownToolbar
|
|
@@ -426,6 +427,7 @@ They are used as attributes of the editor component, eg: `Editor.DropdownToolbar
|
|
|
426
427
|
- `onChange`: `(visible: boolean) => void`, necessary.
|
|
427
428
|
|
|
428
429
|
- **slots**
|
|
430
|
+
|
|
429
431
|
- `trigger`: `string | JSX.Element`, necessary, it is usually an icon, which is displayed on the toolbar.
|
|
430
432
|
- `overlay`: `string | JSX.Element`, necessary, content of dropdown box.
|
|
431
433
|
|
|
@@ -450,14 +452,16 @@ They are used as attributes of the editor component, eg: `Editor.DropdownToolbar
|
|
|
450
452
|
- `onAdjust`:`(val: boolean) => void`, fullscreen button click event.
|
|
451
453
|
|
|
452
454
|
- **slots**
|
|
455
|
+
|
|
453
456
|
- `trigger`: `string | JSX.Element`, necessary, it is usually an icon, which is displayed on the toolbar.
|
|
454
457
|
- `overlay`: `string | JSX.Element`, necessary, content of Modal.
|
|
455
458
|
|
|
456
|
-
###
|
|
459
|
+
### Catalog
|
|
457
460
|
|
|
458
|
-
`Editor.
|
|
461
|
+
`Editor.MdCatalog`
|
|
459
462
|
|
|
460
463
|
- **props**
|
|
464
|
+
|
|
461
465
|
- `editorId`: `string`, necessary, same as editor's `editorId`, used to register listening events.
|
|
462
466
|
- `class`: `string`, not necessary.
|
|
463
467
|
- `markedHeadingId`: `MarkedHeadingId`, not necessary, same as editor.
|
package/lib/MdEditor/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
1
2
|
import NormalToolbar from './extensions/NormalToolbar';
|
|
2
3
|
import DropdownToolbar from './extensions/DropdownToolbar';
|
|
3
4
|
import Catalog from './extensions/Catalog';
|
|
@@ -605,6 +606,7 @@ declare const _default: {
|
|
|
605
606
|
readonly Catalog: typeof Catalog;
|
|
606
607
|
readonly ModalToolbar: typeof ModalToolbar;
|
|
607
608
|
readonly config: typeof configFn;
|
|
609
|
+
install: (app: App) => App;
|
|
608
610
|
};
|
|
609
611
|
export default _default;
|
|
610
612
|
export * from './type';
|