fix(demo): correct bold/italic icon class names#287
Merged
Conversation
The demo's custom buttonsConfig overrode the default bold/italic buttons with icon classes `icon-bold`/`icon-italic`, but the library CSS only defines the `nwe-`-prefixed classes. With no matching rule the background SVG never loaded, so both buttons rendered blank. The classes were renamed `icon-*` -> `nwe-icon-*` in 1cc0c67 but this demo override was never updated. Reported by @bampakoa in #286. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
PR review rate limit exceeded |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
The demo app's bold and italic toolbar buttons render with no icon. This fixes the two icon class names so both buttons show their glyphs.
Why
The demo passes a custom
buttonsConfigtoNgxWigModule.forRoot(...)that overrides the defaultbold/italicbuttons with the wrong icon classes:The library CSS only defines the
nwe--prefixed classes (.nwe-icon-bold,.nwe-icon-italic). With no matching rule, the background SVG never loads, so the buttons render blank. The other buttons (UL, OL, link, underline) use the library defaults with correct classes, which is why only bold/italic were affected.The classes were renamed
icon-*→nwe-icon-*in 1cc0c67, but this demo override was never updated — so it's been broken onmasterever since (independent of the Angular 22 upgrade).Fix
Verification
Built the lib + ran the demo locally — both B and I icons now render correctly alongside the rest of the toolbar.
Reported by @bampakoa in #286.
🤖 Generated with Claude Code