Skip to content

fix(demo): correct bold/italic icon class names#287

Merged
stevermeister merged 1 commit into
masterfrom
fix/demo-bold-italic-icons
May 30, 2026
Merged

fix(demo): correct bold/italic icon class names#287
stevermeister merged 1 commit into
masterfrom
fix/demo-bold-italic-icons

Conversation

@stevermeister

Copy link
Copy Markdown
Collaborator

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 buttonsConfig to NgxWigModule.forRoot(...) that overrides the default bold/italic buttons with the wrong icon classes:

bold:   { ..., icon: 'icon-bold' }
italic: { ..., icon: 'icon-italic' }

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 on master ever since (independent of the Angular 22 upgrade).

Fix

-    icon: 'icon-bold'
+    icon: 'nwe-icon-bold'
...
-    icon: 'icon-italic'
+    icon: 'nwe-icon-italic'

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

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>
@windsurf-bot

windsurf-bot Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor

PR review rate limit exceeded

@sonarqubecloud

Copy link
Copy Markdown

@stevermeister stevermeister merged commit ef8f302 into master May 30, 2026
3 checks passed
@bampakoa bampakoa deleted the fix/demo-bold-italic-icons branch June 5, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant