Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I implement my own buttons and functions for Trix

Sebastian asked in Gems / Libraries

Hey, i want to have the possibility to add more functionality in my text editor trix.
I think about basic stuff as centering text etc. and more advanced stuff like post spotify songs or twitter feeds etc. is this possible ?

Reply

+1 for this.

Reply
Reply

ha, thats me answering that question.

It's not just the actual buttons, which is ok for simple things - its allowing video/twitter/insta embeds and adding more complex dialogs for links and image insertion.

For dialogs and images, i'd like to be able to send a rails view/partial to provide an image chooser. For the link dialog, customising it to allow choosing from a list of internal links or an input for external. choose open in _blank etc.

there doesnt seem to be much docs for that stuff because the BC crew are focused on using trix for formatting comments & documents in basecamp type of use cases.

Reply

thanks for sharing , this will help me

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.