cjwirth / RichEditorView

RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing.
BSD 3-Clause "New" or "Revised" License
1.9k stars 445 forks source link

Customize Tool Bar #97

Closed RanjitKadam closed 7 years ago

RanjitKadam commented 7 years ago

how to add spacing between buttons in existing tool bar? and change color of buttons from blue to something else

Also if I want to create a custom toolbar , how should i proceed? I created a new class and xib but how to proceed further ? so that i can interact with buttons on my toolbar

cjwirth commented 7 years ago

Hey! Thanks for checking out my project 😃

how to add spacing between buttons in existing tool bar? and change color of buttons from blue to something else

The default toolbar that exists in the project isn't meant to be customized. It's an example to show how you can create your own toolbar (and it helped me in development, too!)

Also if I want to create a custom toolbar , how should i proceed? I created a new class and xib but how to proceed further ? so that i can interact with buttons on my toolbar

I'm not going to walk you through making a custom toolbar, because that's going to be very specific to your app. This is the reason I didn't make a toolbar for everyone to use -- everyone's requirements are different!

That being said, if you have a UIView that you want to use for the toolbar, you just have to set it to the inputAccessoryView of the editor view, and it should appear above the keyboard.

Enabling interaction between the toolbar and the editor should be pretty simple if you've done any iOS development before. You can take a look at the sample to see how I'm doing it if you need some inspiration, but there are other approaches as well.