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.

Link decorator not work with plugin

See original GitHub issue

Hello When I use <Editor> from draft-js-plugins I found that the DraftJS example : link didn’t work with plugin’s <Editor> It looks like decorator didn’t has any effect

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

I have a sample code in this repo : https://github.com/DerekHung/link-draft-plugin-example

Would you help to solve this problem?

Thanks~

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
mzbaccommented, Aug 29, 2016

refer to FAQ.m. we are able to pass custom decorators on decorators props

const customDecorators = [
  {
    strategy: findLinkEntities,
    component: Link,
  },
];

// Editor accepts a prop called decorators. 
const MyEditor = ({ editorState, onChange }) => (
  <Editor
    editorState={editorState}
    onChange={onChange}
    decorators={customDecorators}
    plugins={[plugin1, plugin2]}
  />
);
0reactions
nazarposhtacommented, Jun 19, 2018

@DerekHung did you resolve that problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link plugin (anchor) decorators not working · Issue #1768
Hi, I'm using custom decorators with draft.js and now my links don't have any styles on them. They stop working when I am...
Read more >
ES6 property decorator @Prop() decorator not working
I declare 2 props, state through the @Component decorator (vue-class-component) and test through the @Prop decorator (vue-property-decorator).
Read more >
How To Use Decorators in TypeScript
Decorators are a way to decorate members of a class, or a class itself, with extra functionality. This tutorial covers creating decorators ......
Read more >
Link - CKEditor 5 Documentation
Link decorators are disabled by default and it takes a proper configuration to enable them in your rich-text editor. # Demo. In the...
Read more >
WooCommerce Email Customizer Plugin (User Guide)
Link social media icons or title in the emails. ... The Decorator plugin will not create or send any order emails. The plugin...
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