How to hide align buttons from toolbar?
When I align image from the main toolbar of quill then alignments remains in quill. While If I use the align buttons from quill-blot-formatter then alignments does not save in quill. If I dont user alignAction then resizer for video stops working.
So I just want to hide the three buttons of alignments from quill-blot-formatter. How to do that?
I am using this package in angular 7 along with ngx-quill.
I created CustomImageSpec class that extends ImageSpec and I also delete AlignAction.
import { DeleteAction, ResizeAction, ImageSpec } from 'quill-blot-formatter'; export class CustomImageSpec extends ImageSpec { getActions() { return [DeleteAction, ResizeAction]; } }
and in your quill init add your CustomImageSpec to blotFormatter config.
this.quill = new Quill(... , { modules: { ... blotFormatter: { specs: CustomImageSpec } } });
@gyfrxy-forever throwing a bug A Client Error Occured: TypeError: this.options.specs.map is not a function
to fix it pass the CustomImageSpec as array like this: this.quill = new Quill(... , { modules: { ... blotFormatter: { specs: [CustomImageSpec] } } });
and thanks for the workaround!