-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] paste markdown content and then edit clears content #380
Comments
|
Is it setting the value appropriately on paste? Or dropping content bc of validation “on set”? |
So, problem in the next: Block Paragraph contains only one element paragraph. Here is valid example: - block
- element
- text But by pasting this content from your example it creates four elements per Paragraph block. - block
- element
- text
- element
- text
- element
- text
- element
- text So, If you will check value of pasted block. It will be: // current not valid value after pasting
const ParagraphBlockData = {
id: 'eacacf8a-3421-46ee-b1b9-f024359f92d4',
type: 'Paragraph',
value: [
// element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: '# Meeting',
},
],
},
// element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: '',
},
],
},
// element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: 'Date: [YYYY-MM-DD]',
},
],
},
// element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: 'Chair: [Name]',
},
],
},
// element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: '',
},
],
},
// element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: '## Executive Summary',
},
],
},
],
meta: {
align: 'left',
depth: 0,
order: 0,
},
}; instead of this valid: const ParagraphBlockData = {
id: 'eacacf8a-3421-46ee-b1b9-f024359f92d4',
type: 'Paragraph',
value: [
// only one element
{
id: 'f2f77e36-f40d-4c69-951d-ba47fe9ed468',
type: 'paragraph',
children: [
{
text: '# Meeting \n Date: [YYYY-MM-DD] \n Chair: [Name] \n ## Executive Summary',
},
],
},
],
meta: {
align: 'left',
depth: 0,
order: 0,
},
}; |
The pasting of content is handled |
Has this bug been raised before?
Description
After pasting md content into yoopta editor
And then typing to set Meeting as h1, it clears content.
Seen on version 4.8.4 and above.
Screenshots
yoopta.mov
Do you want to work on this issue?
Yes
The text was updated successfully, but these errors were encountered: