Skip to content

Commit 1ccfe55

Browse files
committed
[Ui] wysiwyg : add autofocus prop
1 parent 486dacc commit 1ccfe55

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

vertigo-ui-wysiwyg/src/components/Wysiwyg.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@
9898
linkConfiguration: {
9999
type: Object,
100100
default: {}
101+
},
102+
autofocus: {
103+
type: Boolean,
104+
default: false
101105
}
102106
})
103107
@@ -294,9 +298,11 @@
294298
extensions: [Document, Paragraph, Text, History, HardBreak, Gapcursor, ...activeExtensions],
295299
onUpdate: function({editor}) {
296300
model.value = editor.getHTML();
297-
}
301+
},
302+
autofocus: props.autofocus,
298303
})
299304
305+
300306
watch(model, (newValue, oldValue) => {
301307
if (newValue !== editor?.value?.getHTML()) {
302308
// outer model change

vertigo-ui/src/main/resources/io/vertigo/ui/static/js/wysiwyg/vertigo-wysiwyg.es.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16348,6 +16348,10 @@ const Ab = Te.create({
1634816348
linkConfiguration: {
1634916349
type: Object,
1635016350
default: {}
16351+
},
16352+
autofocus: {
16353+
type: Boolean,
16354+
default: !1
1635116355
}
1635216356
}, {
1635316357
modelValue: {},
@@ -16539,7 +16543,8 @@ const Ab = Te.create({
1653916543
extensions: [d0, f0, h0, w0, T0, I0, ...l],
1654016544
onUpdate: function({ editor: u }) {
1654116545
t.value = u.getHTML();
16542-
}
16546+
},
16547+
autofocus: r.autofocus
1654316548
});
1654416549
bd(t, (u, d) => {
1654516550
var f, h;

vertigo-ui/src/main/resources/io/vertigo/ui/static/js/wysiwyg/vertigo-wysiwyg.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/main/resources/io/vertigo/ui/static/js/wysiwyg/vertigo-wysiwyg.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertigo-ui/src/main/resources/io/vertigo/ui/static/js/wysiwyg/vertigo-wysiwyg.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)