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', () => { it('recognizes embed code', () => {
const editor = createEditor() const editor = createEditor()
const expected = { const expected = {
type: 'doc',
content: [ content: [
{ {
type: 'paragraph',
content: [ content: [
{ {
text: 'Baby loves cat:', text: 'Baby loves cat:',
type: 'text', type: 'text',
}, },
], ],
type: 'paragraph',
}, },
{ {
content: [ type: 'embed',
{ attrs: {
attrs: { dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo',
dataEmbedUrl: 'https://www.youtube.com/watch?v=qkdXAtO40Fo', },
},
type: 'embed',
},
],
type: 'paragraph',
}, },
], ],
type: 'doc',
} }
expect(editor.getJSON()).toEqual(expected) expect(editor.getJSON()).toEqual(expected)
}) })
}) })

View File

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