Skip to content

Commit 9256255

Browse files
committed
Added unlayer template converter demo
1 parent d7106ec commit 9256255

File tree

3 files changed

+911
-0
lines changed

3 files changed

+911
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ npm-debug.log*
2727
yarn-debug.log*
2828
yarn-error.log*
2929
example/.env
30+
example/.env

example/basic/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ const BasicExample = () => {
137137
console.log("dfsdf");
138138
};
139139

140+
const loadConvertDesign = () => {
141+
const mailui = mailUiEditorRef.current?.editor;
142+
mailui?.loadDesign(unlayerTemplate);
143+
console.log("dfsdf__");
144+
};
145+
140146
const loadListener = () => {
141147
const mailui = mailUiEditorRef.current?.editor;
142148

@@ -362,6 +368,9 @@ const BasicExample = () => {
362368
<button className="btn btn-sm btn-secondary" onClick={loadTemplate}>
363369
Load Template
364370
</button>
371+
<button className="btn btn-sm btn-secondary" onClick={loadConvertDesign}>
372+
Convert Unlayer
373+
</button>
365374
<button className="btn btn-sm btn-secondary" onClick={loadDesign}>
366375
Load Design
367376
</button>

0 commit comments

Comments
 (0)