mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-13 21:14:29 -06:00
Add toolbar button attributes to type declaration
This commit is contained in:
parent
98d9049728
commit
4ddb5b8e1b
@ -59,6 +59,9 @@ const editor2 = new EasyMDE({
|
||||
title: 'A Custom Button',
|
||||
noDisable: undefined,
|
||||
noMobile: false,
|
||||
attributes: {
|
||||
'data-custom': 'attribute',
|
||||
}
|
||||
},
|
||||
'|',
|
||||
{
|
||||
@ -89,6 +92,10 @@ const editor2 = new EasyMDE({
|
||||
action: EasyMDE.toggleBold,
|
||||
className: 'fa fas fa-bold',
|
||||
title: 'Bold',
|
||||
attributes: {
|
||||
'data-custom': 'some value',
|
||||
'data-custom-2': 'another value',
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
|
5
types/easymde.d.ts
vendored
5
types/easymde.d.ts
vendored
@ -74,6 +74,10 @@ declare namespace EasyMDE {
|
||||
italic?: string;
|
||||
}
|
||||
|
||||
interface CustomAttributes {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
interface InsertTextOptions {
|
||||
horizontalRule?: ReadonlyArray<string>;
|
||||
image?: ReadonlyArray<string>;
|
||||
@ -142,6 +146,7 @@ declare namespace EasyMDE {
|
||||
noDisable?: boolean;
|
||||
noMobile?: boolean;
|
||||
icon?: string;
|
||||
attributes?: CustomAttributes;
|
||||
}
|
||||
|
||||
interface ImageTextsOptions {
|
||||
|
Loading…
x
Reference in New Issue
Block a user