Custom-style-map doesn't affect built-in 'Quick Styles'
See original GitHub issueI have the following in a text file:
p[style-name='Test Style'] => div.aside > h2:fresh
p[style-name='Test Style2'] => div.aside > p:fresh
p[style-name='Emphasis'] => div.aside > p:fresh
I’m running this from the command line using the ‘–style-map’ flag pointed at the above file. The first two style rules take affect as expected. The third rule does nothing. The same goes for any of the built-in (pre-defined) Quick Styles in Word.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Changing customStyleMap doesn't trigger re-render until ...
After customStyleMap is changed, nothing happens until contentState ... But the changes to the style map that I pass do not have any...
Read more >React inline style doesn't affect my custom component
You need to take the style prop given to MyComponent and add it to the style prop of one of the elements inside...
Read more >Complex Inline Styles - Draft.js
Mapping a style string to CSS Within your Editor use case, you may provide the customStyleMap prop to define your style objects. (See...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for the quick response. You are correct about case-sensitivity, but only for the various heading levels. I looked at the XML and it looks like the Quick Styles I was having trouble with were
w:type="character"
rather thanw:type="paragraph"
. The solution is to user[style-name='Emphasis']
rather thanp[style-name='Emphasis']
.Here’s a summary of my findings for the pre-defined Quick Styles in MS Word:
On the subject of case sensitivity, would it be difficult to make the style-maps case-insensitive?
Nicely done!