Merge pull request #2242 from Human-Connection/fix-1937

fix(editor): Fix hashtags not working after embeded content
This commit is contained in:
Robert Schäfer 2019-11-15 15:50:11 +01:00 committed by GitHub
commit fd4fee9aee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 13 deletions

View File

@ -63,30 +63,26 @@ describe('defaultExtensions', () => {
it('recognizes embed code', () => {
const editor = createEditor()
const expected = {
type: 'doc',
content: [
{
type: 'paragraph',
content: [
{
text: 'Baby loves cat:',
type: 'text',
},
],
type: 'paragraph',
},
{
content: [
{
attrs: {
dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo',
},
type: 'embed',
},
],
type: 'paragraph',
type: 'embed',
attrs: {
dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo',
},
},
],
type: 'doc',
}
expect(editor.getJSON()).toEqual(expected)
})
})

View File

@ -38,8 +38,8 @@ export default class Embed extends Node {
default: null,
},
},
group: 'inline',
inline: true,
group: 'block',
inline: false,
parseDOM: [
{
tag: 'a[href].embed',