Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
8c03792c
Commit
8c03792c
authored
May 30, 2025
by
tyyin lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(首页富文本): 自定义format值丢失问题
parent
ddfb409c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
template-input-prompt.ts
...ents/rich-text-input-box/formats/template-input-prompt.ts
+7
-0
index.vue
src/views/home/components/rich-text-input-box/index.vue
+10
-10
No files found.
src/views/home/components/rich-text-input-box/formats/template-input-prompt.ts
View file @
8c03792c
...
...
@@ -87,6 +87,13 @@ class TemplateInputPromptBlot extends Embed {
return
root
}
static
value
(
spanEl
:
HTMLSpanElement
)
{
return
{
placeholder
:
spanEl
.
dataset
.
placeholder
,
index
:
spanEl
.
dataset
.
index
,
}
}
}
Quill
.
register
(
TemplateInputPromptBlot
)
src/views/home/components/rich-text-input-box/index.vue
View file @
8c03792c
...
...
@@ -132,16 +132,16 @@ watchEffect(() => {
}
})
quillInst
.
value
.
clipboard
.
addMatcher
(
'span.template-input-prompt-container'
,
(
node
)
=>
{
const
spanEl
=
node
as
HTMLSpanElement
return
new
Delta
().
insert
({
'template-input-prompt'
:
{
placeholder
:
spanEl
.
dataset
.
placeholder
,
index
:
spanEl
.
dataset
.
index
,
},
})
})
//
quillInst.value.clipboard.addMatcher('span.template-input-prompt-container', (node) => {
//
const spanEl = node as HTMLSpanElement
//
return new Delta().insert({
//
'template-input-prompt': {
//
placeholder: spanEl.dataset.placeholder,
//
index: spanEl.dataset.index,
//
},
//
})
//
})
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment