Inquiry Regarding Package Customization #188
Replies: 5 comments 1 reply
-
I just merged some changes that I think will answer your questions. Check out the new Customizing the MarkupEditor section of the README. I included an example of customizing the caret and selection color in CSS since you asked. I am not a CSS expert, so I hope the information in the README and this example will get you going in the right direction without needing CSS advice from me 😜. The information on customizing the toolbar was already in the README, but may not explicitly answer your question about removing one of the buttons. I think what you mean by removing the "attachment options for ... images" is to remove the "insert image" button. To do this, you would follow the directions in the README around using ToolbarContents and specify:
Check out the AppDelegate to see where this is done in the demo. Also see #158 for a related query. If by "attachment options for files" you are talking about the items on the left side of the toolbar in the demo, then note that the section on the left of the toolbar is something I put in just for demo in DemoContentView using:
If you remove this line, the FileToolbar at the left will be gone. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your assistance! |
Beta Was this translation helpful? Give feedback.
-
All the toolbars are just SwiftUI views. If you look in MarkupToolbar you can see it contains all the other toolbars (e.g., CorrectionToolbar, InsertToolbar, etc.). The toolbars themselves hold ToolbarImageButtons. So you would just change their color by adding an image modifier to the view. For example, adding:
to the ZStack in MarkupToolbar makes the background for the entire toolbar red. There's no built-in way to do such customization via a MarkupEditor API. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response; it was very helpful. 🙏🏾 |
Beta Was this translation helpful? Give feedback.
-
Thank you for your fast response! Indeed, it appears to be the same issue as mentioned in #159. |
Beta Was this translation helpful? Give feedback.
-
Hi Steven,
I have a couple of questions about your package, and I would appreciate your guidance on them.
Firstly, I've been attempting to change the main color (currently blue) through various methods, but without success. Could you please provide some assistance in achieving this?
Additionally, I'm interested in customizing the package further, specifically by removing one of the buttons—such as the attachment options for files or images. Is this customization possible?
Thank you for your time and support.
Beta Was this translation helpful? Give feedback.
All reactions