easy-email-extensions 4.1.4 → 4.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/AttributePanel/AttributePanel.d.ts +3 -3
- package/lib/AttributePanel/components/UI/Help/index.d.ts +7 -7
- package/lib/AttributePanel/components/UI/HtmlEditor.d.ts +5 -5
- package/lib/AttributePanel/components/attributes/Align.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/AttributesPanelWrapper/index.d.ts +6 -6
- package/lib/AttributePanel/components/attributes/Background.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/BackgroundColor.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Border.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/BorderColor.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/BorderStyle.d.ts +5 -5
- package/lib/AttributePanel/components/attributes/BorderWidth.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/ClassName.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/CollapseWrapper/index.d.ts +5 -5
- package/lib/AttributePanel/components/attributes/Color.d.ts +4 -4
- package/lib/AttributePanel/components/attributes/Condition.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/ContainerBackgroundColor.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Decoration.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Direction.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/FontFamily.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/FontSize.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/FontStyle.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/FontWeight.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Height.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Iteration.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/LetterSpacing.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/LineHeight.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Link.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Margin.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/MergeTags.d.ts +6 -6
- package/lib/AttributePanel/components/attributes/NavbarLinkPadding.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Padding.d.ts +6 -6
- package/lib/AttributePanel/components/attributes/TextAlign.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/TextDecoration.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/TextTransform.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/VerticalAlign.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Width.d.ts +5 -5
- package/lib/AttributePanel/components/attributes/index.d.ts +30 -30
- package/lib/AttributePanel/components/blocks/Accordion/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/AccordionElement/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/AccordionText/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/AccordionTitle/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Button/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Carousel/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Column/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Divider/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Group/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Hero/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Image/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Navbar/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Page/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Raw/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Section/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Social/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Spacer/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Table/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Text/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Wrapper/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/index.d.ts +55 -55
- package/lib/AttributePanel/components/provider/PresetColorsProvider/index.d.ts +6 -6
- package/lib/AttributePanel/components/provider/SelectionRangeProvider/index.d.ts +6 -6
- package/lib/AttributePanel/hooks/useSelectionRange.d.ts +7 -7
- package/lib/AttributePanel/index.d.ts +3 -3
- package/lib/AttributePanel/utils/BlockAttributeConfigurationManager.d.ts +10 -10
- package/lib/AttributePanel/utils/InputNumberAdapter.d.ts +2 -2
- package/lib/AttributePanel/utils/PromiseEach.d.ts +1 -1
- package/lib/AttributePanel/utils/Uploader.d.ts +35 -35
- package/lib/AttributePanel/utils/awaitForElement.d.ts +4 -4
- package/lib/AttributePanel/utils/classnames.d.ts +1 -1
- package/lib/AttributePanel/utils/getImg.d.ts +8 -8
- package/lib/AttributePanel/utils/onDrag.d.ts +10 -10
- package/lib/AttributePanel/utils/previewLoadImage.d.ts +1 -1
- package/lib/BlockLayer/components/BlockTree/index.d.ts +51 -51
- package/lib/BlockLayer/components/BlockTree/transparentImage.d.ts +1 -1
- package/lib/BlockLayer/components/ContextMenu/index.d.ts +14 -14
- package/lib/BlockLayer/components/EyeIcon/index.d.ts +7 -7
- package/lib/BlockLayer/hooks/useAvatarWrapperDrop.d.ts +24 -24
- package/lib/BlockLayer/index.d.ts +13 -13
- package/lib/InteractivePrompt/components/FocusTooltip.d.ts +1 -1
- package/lib/InteractivePrompt/components/HoverTooltip.d.ts +1 -1
- package/lib/InteractivePrompt/components/Toolbar.d.ts +1 -1
- package/lib/InteractivePrompt/index.d.ts +1 -1
- package/lib/InteractivePrompt/utils/awaitForElement.d.ts +4 -4
- package/lib/MergeTagBadgePrompt/index.d.ts +1 -1
- package/lib/ShortcutToolbar/ShortcutToolbar.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlockMaskWrapper/index.d.ts +6 -6
- package/lib/ShortcutToolbar/components/BlocksPanel/index.d.ts +2 -2
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/AccordionBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ButtonBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/CarouselBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ColumnBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/DividerBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/GroupBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/HeroBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ImageBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/NavbarBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/RawBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SectionBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SocialBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SpacerBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/TextBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/WrapperBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/index.d.ts +18 -18
- package/lib/ShortcutToolbar/components/DragIcon/index.d.ts +8 -8
- package/lib/ShortcutToolbar/components/Picture/index.d.ts +7 -7
- package/lib/ShortcutToolbar/index.d.ts +4 -4
- package/lib/ShortcutToolbar/utils/BlockMarketManager.d.ts +32 -32
- package/lib/ShortcutToolbar/utils/getImg.d.ts +68 -68
- package/lib/SimpleLayout/SimpleLayout.d.ts +6 -6
- package/lib/SimpleLayout/index.d.ts +1 -1
- package/lib/SourceCodePanel/index.d.ts +1 -1
- package/lib/components/AddToCollection/index.d.ts +5 -5
- package/lib/components/Form/AddFont.d.ts +1 -1
- package/lib/components/Form/AutoComplete.d.ts +11 -11
- package/lib/components/Form/CheckBoxGroup.d.ts +14 -14
- package/lib/components/Form/CodemirrorEditor/index.d.ts +8 -8
- package/lib/components/Form/ColorPicker.d.ts +10 -10
- package/lib/components/Form/EditGridTab.d.ts +10 -10
- package/lib/components/Form/EditTab.d.ts +10 -10
- package/lib/components/Form/ImageUploader/index.d.ts +8 -8
- package/lib/components/Form/InlineTextField/index.d.ts +7 -7
- package/lib/components/Form/Input.d.ts +7 -7
- package/lib/components/Form/InputWithUnit.d.ts +10 -10
- package/lib/components/Form/RadioGroup.d.ts +13 -13
- package/lib/components/Form/RichTextField/index.d.ts +2 -2
- package/lib/components/Form/RichTextToolBar/RichTextToolBar.d.ts +3 -3
- package/lib/components/Form/RichTextToolBar/components/BasicTools.d.ts +1 -1
- package/lib/components/Form/RichTextToolBar/components/Bold/index.d.ts +6 -6
- package/lib/components/Form/RichTextToolBar/components/FontFamily/index.d.ts +5 -5
- package/lib/components/Form/RichTextToolBar/components/FontSize/index.d.ts +5 -5
- package/lib/components/Form/RichTextToolBar/components/Heading/index.d.ts +3 -3
- package/lib/components/Form/RichTextToolBar/components/Italic/index.d.ts +6 -6
- package/lib/components/Form/RichTextToolBar/components/Link/index.d.ts +12 -12
- package/lib/components/Form/RichTextToolBar/components/MergeTags/index.d.ts +5 -5
- package/lib/components/Form/RichTextToolBar/components/StrikeThrough/index.d.ts +6 -6
- package/lib/components/Form/RichTextToolBar/components/ToolItem/index.d.ts +9 -9
- package/lib/components/Form/RichTextToolBar/components/Tools/IconBgColor/index.d.ts +5 -5
- package/lib/components/Form/RichTextToolBar/components/Tools/IconFontColor/index.d.ts +5 -5
- package/lib/components/Form/RichTextToolBar/components/Tools/Tools.d.ts +4 -4
- package/lib/components/Form/RichTextToolBar/components/Tools/index.d.ts +1 -1
- package/lib/components/Form/RichTextToolBar/components/Underline/index.d.ts +6 -6
- package/lib/components/Form/RichTextToolBar/components/Unlink/index.d.ts +12 -12
- package/lib/components/Form/RichTextToolBar/index.d.ts +1 -1
- package/lib/components/Form/Select.d.ts +11 -11
- package/lib/components/Form/UploadField.d.ts +8 -8
- package/lib/components/Form/enhancer.d.ts +20 -20
- package/lib/components/Form/index.d.ts +34 -34
- package/lib/components/RenderCount/index.d.ts +1 -1
- package/lib/components/ShadowDom/index.d.ts +2 -2
- package/lib/constants.d.ts +1 -0
- package/lib/hooks/useAddToCollection.d.ts +6 -6
- package/lib/hooks/useFontFamily.d.ts +6 -6
- package/lib/index.d.ts +13 -12
- package/lib/index.js +1 -1
- package/lib/index2.js +55 -38
- package/lib/index2.js.map +1 -1
- package/lib/index3.js.map +1 -1
- package/lib/utils/awaitForElement.d.ts +4 -4
- package/lib/utils/classnames.d.ts +1 -1
- package/lib/utils/getBlockTitle.d.ts +2 -2
- package/lib/utils/getContextMergeTags.d.ts +7 -7
- package/lib/utils/getIconNameByBlockType.d.ts +1 -1
- package/lib/utils/getPreviewClassName.d.ts +1 -1
- package/package.json +2 -2
- package/readme.md +138 -138
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare function awaitForElement<T extends HTMLElement>(idx: string): {
|
2
|
-
cancel: () => void;
|
3
|
-
promise: Promise<T>;
|
4
|
-
};
|
1
|
+
export declare function awaitForElement<T extends HTMLElement>(idx: string): {
|
2
|
+
cancel: () => void;
|
3
|
+
promise: Promise<T>;
|
4
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export declare function classnames(...rest: any[]): string;
|
1
|
+
export declare function classnames(...rest: any[]): string;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { IBlockData } from 'easy-email-core';
|
2
|
-
export declare function getBlockTitle(blockData: IBlockData, isFromContent?: boolean): string;
|
1
|
+
import { IBlockData } from 'easy-email-core';
|
2
|
+
export declare function getBlockTitle(blockData: IBlockData, isFromContent?: boolean): string;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
export declare function getContextMergeTags(mergeTags: {
|
2
|
-
[key: string]: any;
|
3
|
-
}, context: {
|
4
|
-
[key: string]: any;
|
5
|
-
}, idx: string): {
|
6
|
-
[key: string]: any;
|
7
|
-
};
|
1
|
+
export declare function getContextMergeTags(mergeTags: {
|
2
|
+
[key: string]: any;
|
3
|
+
}, context: {
|
4
|
+
[key: string]: any;
|
5
|
+
}, idx: string): {
|
6
|
+
[key: string]: any;
|
7
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export declare function getIconNameByBlockType(type: string): any;
|
1
|
+
export declare function getIconNameByBlockType(type: string): any;
|
@@ -1 +1 @@
|
|
1
|
-
export declare function getPreviewClassName(idx: string | null, type: string): string;
|
1
|
+
export declare function getPreviewClassName(idx: string | null, type: string): string;
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "easy-email-extensions",
|
3
3
|
"license": "MIT",
|
4
4
|
"description": "Email editor",
|
5
|
-
"version": "4.1.
|
5
|
+
"version": "4.1.7",
|
6
6
|
"author": "m-Ryan",
|
7
7
|
"repository": {
|
8
8
|
"type": "git",
|
@@ -84,5 +84,5 @@
|
|
84
84
|
"react-dom": "^17.0.2",
|
85
85
|
"react-final-form": "^6.5.7"
|
86
86
|
},
|
87
|
-
"gitHead": "
|
87
|
+
"gitHead": "23a823a14118f9c85777e772c18a126e4deaad3d"
|
88
88
|
}
|
package/readme.md
CHANGED
@@ -1,138 +1,138 @@
|
|
1
|
-
# Easy-email-extensions
|
2
|
-
|
3
|
-
## Introduction
|
4
|
-
|
5
|
-
Provide default UI components, when they don’t meet your needs, you can refer to it and write your own
|
6
|
-
|
7
|
-
## usage
|
8
|
-
|
9
|
-
```sh
|
10
|
-
$ npm install --save easy-email-extensions
|
11
|
-
```
|
12
|
-
|
13
|
-
or
|
14
|
-
|
15
|
-
```sh
|
16
|
-
$ yarn add easy-email-extensions
|
17
|
-
```
|
18
|
-
|
19
|
-
```js
|
20
|
-
import React from 'react';
|
21
|
-
import { BlockManager, BasicType } from 'easy-email-core';
|
22
|
-
import { EmailEditor, EmailEditorProvider } from 'easy-email-editor';
|
23
|
-
import { SimpleLayout } from 'easy-email-extensions';
|
24
|
-
|
25
|
-
import 'easy-email-editor/lib/style.css';
|
26
|
-
import 'easy-email-extensions/lib/style.css';
|
27
|
-
|
28
|
-
const initialValues = {
|
29
|
-
subject: 'Welcome to Easy-email',
|
30
|
-
subTitle: 'Nice to meet you!',
|
31
|
-
content: BlockManager.getBlockByType(BasicType.PAGE)!.create({}),
|
32
|
-
};
|
33
|
-
|
34
|
-
export function App() {
|
35
|
-
return (
|
36
|
-
<EmailEditorProvider
|
37
|
-
data={initialValues}
|
38
|
-
height={'calc(100vh - 72px)'}
|
39
|
-
autoComplete
|
40
|
-
dashed={false}
|
41
|
-
>
|
42
|
-
{({ values }) => {
|
43
|
-
return (
|
44
|
-
<SimpleLayout>
|
45
|
-
<EmailEditor />
|
46
|
-
</SimpleLayout>
|
47
|
-
);
|
48
|
-
}}
|
49
|
-
</EmailEditorProvider>
|
50
|
-
);
|
51
|
-
}
|
52
|
-
```
|
53
|
-
|
54
|
-
## Extensions
|
55
|
-
|
56
|
-
- `AttributePanel`
|
57
|
-
|
58
|
-
- Basic block configuration panel
|
59
|
-
|
60
|
-
- <img src="https://assets.maocanhua.cn/3e74a61d-ab22-4cf3-afc9-d511b82e08cd-image.png" alt="AttributePanel">
|
61
|
-
|
62
|
-
- You can add or overwrite
|
63
|
-
|
64
|
-
```tsx
|
65
|
-
import { BlockAttributeConfigurationManager } from "easy-email-extensions";
|
66
|
-
|
67
|
-
BlockAttributeConfigurationManager.add({
|
68
|
-
[BasicType.TEXT]: () => <div>will be overwrite `Text`</div>,
|
69
|
-
});
|
70
|
-
```
|
71
|
-
|
72
|
-
- `InteractivePrompt`
|
73
|
-
|
74
|
-
- block hover and focus style
|
75
|
-
|
76
|
-
- <img src="https://assets.maocanhua.cn/298d72d6-a509-4cd2-85c7-dfb915971620-image.png" alt="InteractivePrompt">
|
77
|
-
|
78
|
-
- No configuration items
|
79
|
-
|
80
|
-
- `BlockLayer`
|
81
|
-
|
82
|
-
- <img src="https://assets.maocanhua.cn/de1f5211-350e-43c9-9c99-d97a2f196e04-image.png" alt="ShortcutToolbar">
|
83
|
-
- No configuration items
|
84
|
-
|
85
|
-
- `ShortcutToolbar`
|
86
|
-
|
87
|
-
- <img src="https://assets.maocanhua.cn/f0e2ccc6-0627-472b-ad78-bc92bdb46ad1-image.png">
|
88
|
-
- You can add or overwrite popover's preset blocks
|
89
|
-
|
90
|
-
```tsx
|
91
|
-
import { BasicType } from "easy-email-core";
|
92
|
-
import {
|
93
|
-
BlockMarketManager,
|
94
|
-
BlockMaskWrapper,
|
95
|
-
} from "easy-email-extensions";
|
96
|
-
|
97
|
-
BlockMarketManager.addCategories([
|
98
|
-
{
|
99
|
-
title: "Custom",
|
100
|
-
name: "custom",
|
101
|
-
blocks: [
|
102
|
-
{
|
103
|
-
type: BasicType.TEXT,
|
104
|
-
title: "Text",
|
105
|
-
description: "This block allows you to display text in your email.",
|
106
|
-
component: () => {
|
107
|
-
return (
|
108
|
-
<BlockMaskWrapper
|
109
|
-
type={BasicType.TEXT}
|
110
|
-
payload={{
|
111
|
-
attributes: {
|
112
|
-
"font-size": "20px",
|
113
|
-
align: "center",
|
114
|
-
padding: "0px 0px 0px 0px",
|
115
|
-
color: "#4A90E2",
|
116
|
-
},
|
117
|
-
data: {
|
118
|
-
value: {
|
119
|
-
content: "20px",
|
120
|
-
},
|
121
|
-
},
|
122
|
-
}}
|
123
|
-
>
|
124
|
-
<div style={{ fontSize: 20, width: "100%", paddingLeft: 20 }}>
|
125
|
-
20px
|
126
|
-
</div>
|
127
|
-
</BlockMaskWrapper>
|
128
|
-
);
|
129
|
-
},
|
130
|
-
},
|
131
|
-
],
|
132
|
-
},
|
133
|
-
]);
|
134
|
-
```
|
135
|
-
|
136
|
-
- `SimpleLayout`
|
137
|
-
|
138
|
-
- All in one extension, provide basic and complete layout example. Refer to the above extension for configuration items.
|
1
|
+
# Easy-email-extensions
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
Provide default UI components, when they don’t meet your needs, you can refer to it and write your own
|
6
|
+
|
7
|
+
## usage
|
8
|
+
|
9
|
+
```sh
|
10
|
+
$ npm install --save easy-email-extensions
|
11
|
+
```
|
12
|
+
|
13
|
+
or
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ yarn add easy-email-extensions
|
17
|
+
```
|
18
|
+
|
19
|
+
```js
|
20
|
+
import React from 'react';
|
21
|
+
import { BlockManager, BasicType } from 'easy-email-core';
|
22
|
+
import { EmailEditor, EmailEditorProvider } from 'easy-email-editor';
|
23
|
+
import { SimpleLayout } from 'easy-email-extensions';
|
24
|
+
|
25
|
+
import 'easy-email-editor/lib/style.css';
|
26
|
+
import 'easy-email-extensions/lib/style.css';
|
27
|
+
|
28
|
+
const initialValues = {
|
29
|
+
subject: 'Welcome to Easy-email',
|
30
|
+
subTitle: 'Nice to meet you!',
|
31
|
+
content: BlockManager.getBlockByType(BasicType.PAGE)!.create({}),
|
32
|
+
};
|
33
|
+
|
34
|
+
export function App() {
|
35
|
+
return (
|
36
|
+
<EmailEditorProvider
|
37
|
+
data={initialValues}
|
38
|
+
height={'calc(100vh - 72px)'}
|
39
|
+
autoComplete
|
40
|
+
dashed={false}
|
41
|
+
>
|
42
|
+
{({ values }) => {
|
43
|
+
return (
|
44
|
+
<SimpleLayout>
|
45
|
+
<EmailEditor />
|
46
|
+
</SimpleLayout>
|
47
|
+
);
|
48
|
+
}}
|
49
|
+
</EmailEditorProvider>
|
50
|
+
);
|
51
|
+
}
|
52
|
+
```
|
53
|
+
|
54
|
+
## Extensions
|
55
|
+
|
56
|
+
- `AttributePanel`
|
57
|
+
|
58
|
+
- Basic block configuration panel
|
59
|
+
|
60
|
+
- <img src="https://assets.maocanhua.cn/3e74a61d-ab22-4cf3-afc9-d511b82e08cd-image.png" alt="AttributePanel">
|
61
|
+
|
62
|
+
- You can add or overwrite
|
63
|
+
|
64
|
+
```tsx
|
65
|
+
import { BlockAttributeConfigurationManager } from "easy-email-extensions";
|
66
|
+
|
67
|
+
BlockAttributeConfigurationManager.add({
|
68
|
+
[BasicType.TEXT]: () => <div>will be overwrite `Text`</div>,
|
69
|
+
});
|
70
|
+
```
|
71
|
+
|
72
|
+
- `InteractivePrompt`
|
73
|
+
|
74
|
+
- block hover and focus style
|
75
|
+
|
76
|
+
- <img src="https://assets.maocanhua.cn/298d72d6-a509-4cd2-85c7-dfb915971620-image.png" alt="InteractivePrompt">
|
77
|
+
|
78
|
+
- No configuration items
|
79
|
+
|
80
|
+
- `BlockLayer`
|
81
|
+
|
82
|
+
- <img src="https://assets.maocanhua.cn/de1f5211-350e-43c9-9c99-d97a2f196e04-image.png" alt="ShortcutToolbar">
|
83
|
+
- No configuration items
|
84
|
+
|
85
|
+
- `ShortcutToolbar`
|
86
|
+
|
87
|
+
- <img src="https://assets.maocanhua.cn/f0e2ccc6-0627-472b-ad78-bc92bdb46ad1-image.png">
|
88
|
+
- You can add or overwrite popover's preset blocks
|
89
|
+
|
90
|
+
```tsx
|
91
|
+
import { BasicType } from "easy-email-core";
|
92
|
+
import {
|
93
|
+
BlockMarketManager,
|
94
|
+
BlockMaskWrapper,
|
95
|
+
} from "easy-email-extensions";
|
96
|
+
|
97
|
+
BlockMarketManager.addCategories([
|
98
|
+
{
|
99
|
+
title: "Custom",
|
100
|
+
name: "custom",
|
101
|
+
blocks: [
|
102
|
+
{
|
103
|
+
type: BasicType.TEXT,
|
104
|
+
title: "Text",
|
105
|
+
description: "This block allows you to display text in your email.",
|
106
|
+
component: () => {
|
107
|
+
return (
|
108
|
+
<BlockMaskWrapper
|
109
|
+
type={BasicType.TEXT}
|
110
|
+
payload={{
|
111
|
+
attributes: {
|
112
|
+
"font-size": "20px",
|
113
|
+
align: "center",
|
114
|
+
padding: "0px 0px 0px 0px",
|
115
|
+
color: "#4A90E2",
|
116
|
+
},
|
117
|
+
data: {
|
118
|
+
value: {
|
119
|
+
content: "20px",
|
120
|
+
},
|
121
|
+
},
|
122
|
+
}}
|
123
|
+
>
|
124
|
+
<div style={{ fontSize: 20, width: "100%", paddingLeft: 20 }}>
|
125
|
+
20px
|
126
|
+
</div>
|
127
|
+
</BlockMaskWrapper>
|
128
|
+
);
|
129
|
+
},
|
130
|
+
},
|
131
|
+
],
|
132
|
+
},
|
133
|
+
]);
|
134
|
+
```
|
135
|
+
|
136
|
+
- `SimpleLayout`
|
137
|
+
|
138
|
+
- All in one extension, provide basic and complete layout example. Refer to the above extension for configuration items.
|