Skip to content

Commit ba93150

Browse files
committed
fix: fix placeholder not effective close #428
1 parent 3a8a0b6 commit ba93150

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/docs/fluent-editor/demos/custom-toolbar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ onMounted(async () => {
2929
3030
editor = new FluentEditor(editorRef.value, {
3131
theme: 'snow',
32+
placeholder: '请输入内容...',
3233
modules: {
3334
toolbar,
3435
file: true,

packages/fluent-editor/src/modules/shortcut-key/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ export class ShortCutKey extends QuillShortcutKey {
2727

2828
resolveOptions(options: Partial<ShortCutKeyInputOptions>) {
2929
const defaultMenuItems = this.defaultMenuList()
30+
const placeholder = this.quill.options.placeholder ? this.quill.options.placeholder : this.quill.getLangText('input-recall-menu-placeholder')
3031
const value: ShortCutKeyOptions = Object.assign({
31-
placeholder: this.quill.getLangText('input-recall-menu-placeholder'),
32+
placeholder,
3233
menuItems: defaultMenuItems,
3334
isMenuItemsAdd: false,
3435
menuKeyboardControls: () => false,

0 commit comments

Comments
 (0)