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.

[draft-js-alignment-plugin] Execute actions after alignment is set

See original GitHub issue

Hey guys,

Is there a way we can capture an “onAlignmentChange” event, so we can execute actions like saving data right after the alignment is set? I was trying to do it from the “onChange” of the draftjs editor, but it fires too many times. Also, if I compare the editorState before and after the “onChange” is fired, for some reason the entityMap is the same (it always shows the new alignment value). So I don’t have a way to know exactly in what moment the alignment changes.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
juliankrispelcommented, May 3, 2018

@NeoHub no there isn’t I’m afraid.

Why do you need just the alignment change? Please explain the use-case to me and I’ll see what I can do.

0reactions
juliankrispelcommented, May 9, 2018

@NeoHub you’re welcome 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text Alignment in Draftjs — and use with draft-js-plugins toolbar
The problem here is that I'm working on an editor for screenplay formatting, So I have previous blocks types such as Action, Dialogue,...
Read more >
draft-js-plugins/alignment - npm
Start using @draft-js-plugins/alignment in your project by running `npm i @draft-js-plugins/alignment`. There are 4 other projects in the ...
Read more >
Complex Inline Styles - Draft.js
The Rich Editor and Colorful Editor examples demonstrate complex inline style behavior in action. Model#. Within the Draft model, inline styles ...
Read more >
Build rich text editors in React using Draft.js and react-draft ...
In this article, we will be using Draft.js and react-draft-wysiwyg to build a rich text editor and display text we created using the...
Read more >
Alignment - DraftJS Plugins - High quality plugins with great UX
This plugin exposes a decorator for blocks. You can use it in combination with any kind of plugin that manages a Draft.js block...
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