3 Commits

Author SHA1 Message Date
mattwr18
aeac1edb32 Add LegacyEmbeds component to fix bug 2019-11-22 12:58:57 +01:00
Robert Schäfer
52e0361087 Fixing pasteRules for Embeds
Apparently the default pasteRules of tiptap interfere with the
pasteRules of a Link (in our case an Embed node). Consider this example:

https://de.wikipedia.org/wiki/Yin_und_Yang

Depending on some random conditions, tiptap might parse the `_und_` to be
italic because it's wrapped with underscores (markdown syntax). The
result is:

https://de.wikipedia.org/wiki/Yin # link
_und_                             # italic
Yang                              # plain text

So let's remove the default pasteRules of `Bold`, `Strike` and `Italic`
marks respectively to prefer our Embeds. Who is copy+pasting from one
tiptap editor to another tiptap editor anyways?
2019-08-05 17:26:50 +02:00
Robert Schäfer
72edf78889 Meld a chaotic commit history into one commit
Some important commit messages:

```
    Fix youtu.be not being embedded

    And also try to maintain the old behaviour matching
    `provider.provider_url`.
```

```
    Remove confusing code comments and obsolete code

    I discovered that the behaviour of no duplicate notifications being send
    out is caused by the frontend: When the editor reads html from the
    backend, it will parse hashtags and mentions as ordinary links, not as
    their respective nodes during editing. Also, we don't have to worry
    about duplicate ids being found: The cypher statement will implicitly
    suppress duplicate notification nodes for the same user.

    So let's remove the code to avoid confusing the next developer.
```

```
    Test editor.getHTML()

    I do this because I'm not able to test the content of `this.editor` from
    a wrapper of `vue-test-utils`. If I call `this.editor.getHTML` directly
    and use it as a computed property `renderedContent` to populate a `<div
    v-html="renderedContent" />` this will not work for the embeds. So, my
    current best bet is to test the editor object isolated from a real
    component. ;(
```

```
    Add core-js as explicit dependency

    Because of build errors on Travis.

    See: https://stackoverflow.com/a/55313456

    Remove as soon as this issue is resolved:
    https://github.com/storybookjs/storybook/issues/7591

```

```
    Refactor: Keep Runtime-only builds

    See: https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
```
2019-08-01 00:28:22 +02:00