Transforms.insertNodes can't insert text: ''
#5428
Answered
by
LiangJunrong
LiangJunrong
asked this question in
Q&A
-
I want to create a blank span and render the HTML structure as follows: <span data-slate-node="text">
<span data-slate-leaf="true">
<span data-slate-zero-width="z" data-slate-length="0"></span>
</span>
</span> And I try to pass const initialValue: Descendant[] = [
{
type: 'paragraph',
children: [
{ text: '111' },
{ text: '' },
],
},
]; However, if I pass
Below is my full code, please help me:
.jsliang-slate-container {
position: relative;
.jsliang-slate {
width: 300px;
background: #fff;
padding: 10px;
border-radius: 4px;
}
.jsliang-button {
position: absolute;
top: 0;
right: 0;
}
}
|
Beta Was this translation helpful? Give feedback.
Answered by
LiangJunrong
May 18, 2023
Replies: 1 comment
-
I resolved it in https://kdocs.cn/l/coF4oIWZz749, thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LiangJunrong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I resolved it in https://kdocs.cn/l/coF4oIWZz749, thanks.