sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
423 stars 182 forks source link

[Feature request]: Custom color #533

Closed willdochnur closed 5 days ago

willdochnur commented 1 month ago

Proposal

I would like to be able to set my own custom color. It does not need to a color picker. Just a simple input field to set hex or rgba color code would do the trick.

Willing to submit a PR?

None

sibiraj-s commented 5 days ago

Hi, Sorry for the delay in response. You can easily create that with a custom menu item, you can use the input of your choice

See: https://sibiraj-s.github.io/ngx-editor/menu/#custom-menu. Once the custom menu is created you can use the following commands to set the color

textColor(<color_value>)
backgroundColor(<color_value>)

See here on how to run commands https://sibiraj-s.github.io/ngx-editor/commands/.