Open in new tab option, fragments, uri schemes, and fixes #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Url checking
I noticed that when you don't add a protocol to a url like this
www.hello.world
the url added to the editor attempts to reference a file
file:///path/to/project/www.hello.world
So I took a look at how to require http or https and noticed
Utils.isUrl() is not working properly in another way
due to the regex.
This is passing the regex
www.0.♪┏(・o・)┛♪
This is failing
http://wwwuzzzuppp.com
I've updated the regex to fix the regex issue and require the protocol.
Adding links should be done through the api or absolute urls.
closes editor-js#8
Impossible to disable server search Issue editor-js#8
editor-js#8
isServerEnabled method calls lacked parenthesis in index.js. It's
now possible to disable the server calls by removing the endpoint
in the config.
closes editor-js#6
Support mailto: URL schema editor-js#6
editor-js#6
I've found myself wishing to to add different tyes of hrefs and
noticed this issue.
I've added 3 URI schemes to check against in Utils.isUrl()
view-source:
mailto:
tel:
It now checks for a URI Scheme and then applies an appropriate
regex to test the remaining url.
The email regex uses control characters so disabled no-control-regex in .eslintrc
Url fragments not recongnized as urls.
Utils.isUrl() now also checks if your string starts with "#"
so you can do this
<a href="#lower_in_the_document">
Which will work great with this plugin.
https://github.com/Aleksst95/header-with-anchor
Can't open links in a new tab.
A checkbox has been added to provide the user an option to open the url in a new tab.
You can tab and shift-tab back and forth between the 2 inputs when adding urls.
Clicking the datawrapper will let you know if the link opens in a new tab or the same tab.
Finally, I've fixed a couple warnings that were shown when running the linter.