Skip to content

Commit 9872bbb

Browse files
committed
feat: 增加 getResult 方法
1 parent ec0df3b commit 9872bbb

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

src/components/BootstrapBlazor.Vditor/Vditor.razor.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,30 @@ export function insertValue(id, value, render) {
6060
}
6161
}
6262

63-
export function execute(id, method) {
63+
export function getResult(id, method) {
6464
const md = Data.get(id);
6565
const { vditor } = md;
6666
let ret = '';
6767
if (vditor) {
6868
var cb = vditor[method];
6969
if (cb) {
70-
ret = cb();
70+
ret = cb.call(vditor);
7171
}
7272
}
7373
return ret;
7474
}
7575

76+
export function execute(id, method) {
77+
const md = Data.get(id);
78+
const { vditor } = md;
79+
if (vditor) {
80+
var cb = vditor[method];
81+
if (cb) {
82+
cb.call(vditor);
83+
}
84+
}
85+
}
86+
7687
export function dispose(id) {
7788
const md = Data.get(id);
7889
const { vditor } = md;

0 commit comments

Comments
 (0)