jpuri / jpuri/draftjs-utils

getSelectionCustomInlineStyle does not return values for multiple styles

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
286
Forks
46
PR merge metrics
No merged PRs in 30d

Description

E.g. if is set 'FONTSIZE' for one part of text, and same style but with different value for another, and we select the whole text, then getSelectionCustomInlineStyle returns FONTSIZE: undefined. Seams it should return an array of styles, like: ["fontsize-30", "fontsize-22"].

This can be reproduced in https://github.com/jpuri/react-draft-wysiwyg

I'm posting it here, because react-draft-wysiwyg is utilizing this function, which should do its job better. :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating getSelectionCustomInlineStyle in this utility repository and reproduce the multiple-value selection with react-draft-wysiwyg. Verify that selecting text with different values for one style returns all values, such as fontsize-30 and fontsize-22, rather than undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.