question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Links not showing

See original GitHub issue

When i add a link to any piece of text i don’t see any style effects applied on that text. The link is saved correctly btw.

And more, is it possible to set the target attribute of the link?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
brijeshb42commented, Nov 4, 2016

With the way you are creating editorState, you will also have to pass 2nd argument in EditorState.createWithContent, that is a list of decorators through which draft knows how to render custom entities like Link in this case. createEditorState in medium-draft takes care of this internally. But if you are using EditorState from draft-js directly, you will have to modify it like this -

import {stateFromHTML} from 'draft-js-import-html';
import {EditorState, CompositeDecorator} from 'draft-js';
import { findLinkEntities, Link } from 'medium-draft';

const decorators = new CompositeDecorator([{
  strategy: findLinkEntities,
  component: Link,
}]);

editorState = EditorState.createWithContent(stateFromHTML(markup), decorators);
0reactions
riccardolorenzoncommented, Nov 4, 2016

It works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Links Not Working in Chrome - groovyPost
Open the Links in Incognito Mode · Disable Chrome Extensions · Update Google Chrome · Clear Cache and Cookies · Reset Browser Settings...
Read more >
Links not Opening in the Browser - Postbox Support
If links are not opening up in the browser, or if two tabs/windows are opening on each click, try the following: 1) Change...
Read more >
Links Not Opening in Chrome (Solved!) - YouTube
In this video I am gonna be showing you how to fix the problem of shopping links and ad links that do not...
Read more >
My links are not appearing. What should I do? | Linktree Help ...
There could be a few reasons your links aren't appearing on your Linktree. Some reasons could be due to a browser or app...
Read more >
Top 6 Ways to Fix Links Not Opening in Google Chrome
1. Restart Google Chrome · 2. Try Opening Links in Incognito Mode · 3. Disable Browser Extensions (For Desktop Only) · 4. Clear...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found