14 Commits

Author SHA1 Message Date
Robert Schäfer
8093fece00 Update URL regex taking e.g. "?" into account 2019-08-05 13:25:50 +02:00
Robert Schäfer
b797ce4b15 Follow @Tirokk's suggestions:
* Add target="_blank" (on embeds only!)
* When pasting a link, the cursor position is moved after the paste
* Can't reproduce a link slipping into the embed in front of it

@Tirokk it is an unpleasant side efffect that mentions + hastags appear
differently on Edit+View. That's because they don't get parsed from
HTML, it's a one way, they are write only. So, when viewing content,
hashtags and mentions appear as plain links. I don't think I can do
anything about it.

Regarding some links not being embedded: Only those links that have an
oembed provider in this file:
f44d0f1f96/backend/src/schema/resolvers/embeds/providers.json
...will be embedded. Your example `http://backreaction.blogspot.com` and `https://de.wikipedia.org/wiki/Yin_und_Yang`
have no embed provider and won't be embedded.

We would have to add oembed providers to this list if we wanted to embed those
links, too.
2019-08-02 23:18:10 +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
Robert Schäfer
455eac1031 Merge remote-tracking branch 'origin/master' into storybook 2019-07-22 13:27:32 +02:00
Matt Rider
30c5558925 Add href to link 2019-07-02 16:25:34 -03:00
Grzegorz Leoniec
6d852b5803 Added basic embed link rendering 2019-06-26 00:44:44 +02:00
Wolfgang Huß
5018e60a13 Renamed Tag to Hashtag in the Frontend
Not in the database yet …
2019-06-21 14:10:56 +02:00
Wolfgang Huß
ffbe0b949a Translate menu item, renamed variables and tried to get hashtag to work correct 2019-06-20 08:40:05 +02:00
Wolfgang Huß
4725b8cbd2 Got Tags as # in the editor as an extension to work 2019-06-19 09:12:26 +02:00
Wolfgang Huß
4e780f52dc Copy and refactoring Mentions to Tags, Started 2019-06-17 18:44:17 +02:00
5202763dd8
frontend lint fixes 2019-05-23 19:40:39 +02:00
Robert Schäfer
e247d25aee Open mentioning link in new tab
This will help some people not to loose data after accidently clicking
on the user @-mentioning.
2019-04-16 22:11:07 +02:00
Robert Schäfer
b21df879c6 Fix lint 2019-04-16 01:39:47 +02:00
Robert Schäfer
d87a0d5694 Customize Mention node based on Superclass 2019-04-16 01:39:47 +02:00