Cannot un-bold text via button (cannot deactivate bold button)
Hello,
I encounter an issue with all the buttons, for example I activate bold, add some text and when I try to select text and click on bold to un-bold the text, the bold button remains still blue and the text remains bold. Only the Ctrl+B command helps to un-bold the text.
Please see my configuration below:
package.json
`"dependencies": {
"@angular/animations": "19.2.15",
"@angular/cdk": "19.2.19",
"@angular/common": "19.2.15",
"@angular/compiler": "19.2.15",
"@angular/core": "19.2.15",
"@angular/forms": "19.2.15",
"@angular/platform-browser": "19.2.15",
"@angular/platform-browser-dynamic": "19.2.15",
"@angular/router": "19.2.15",
"ngx-quill": "^27.1.2",
"quill": "^2.0.3"
[...]
},
"devDependencies": {
"@angular-devkit/build-angular": "19.2.19",
"@angular/cli": "19.2.19",
"@angular/compiler-cli": "^19.2.15",
[...]
}`
app.config.ts - I am using the Angular standalone features:
`provideQuillConfig({
modules: {
toolbar: [
['bold', 'italic', 'underline', 'strike'],
['blockquote', 'code-block'],
['link'], //, 'image', 'video', 'formula'
[{ 'header': 1 }, { 'header': 2 }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }, { 'list': 'check' }],
[{ 'script': 'sub'}, { 'script': 'super' }],
[{ 'indent': '-1'}, { 'indent': '+1' }],
[{ 'direction': 'rtl' }],
[{ 'size': ['small', false, 'large', 'huge'] }], /
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
['clean']
]
}
})
`
I create a custom component to integrate the ngx-quill rich text editor:
`<form [formGroup]="richTextFg">
<quill-editor #editor
[required]="true"
[styles]="{ height: '200px' }"
formControlName="content"
ds-form-validation
></quill-editor>
</form>`
Thank you in advance!
<img width="173" height="124" alt="Image" src="https://github.com/user-attachments/assets/4572500c-b997-4514-834c-9d3b30a35930" />
0 条评论