trix
trix copied to clipboard
Multiple configurations per app?
I was wondering if there was a way to specify multiple configurations of Trix per application?
In my example, I want to use Trix in a very basic form (only Bold, Italic, etc... available) in one place, but also have the full editor available in another place. Right now I can configure a custom toolbar per editor which hides the extra functions, but this doesn't prevent the extra functions getting triggered should someone paste in applicable text from another application (e.g. I don't want to allow lists, but one can paste in a list even if the list button isn't on the toolbar).
I know I can disable lists globally by editing the Trix.config object but I was wondering if there was a way to have multiple Trix objects, or multiple configurations per the one global?
As a workaround you may deactivate all undesirable formatting after paste event has happened.
Ah righty :) Definitely sounds like quite a workaround :D
This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.
Stayin' alive!
This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.
I think this is still something that would be good to support :)
I would love to have something like this as well.
I'm initializing multiple Trix editors on the same page and it would be great to be able to do something like querySelector('trix-editor').editor.config = {...} instead of just having the global config Trix.config which gets applied to all instances.
This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.
I still think this would be a good idea at some point :)
This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.
keepalive
This would definitely be helpful. Perhaps Trix.config could be used as the default configuration, and a per-instance override feature could be added?
This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.
keepalive
This would be very helpful for the project I'm currently on. We have the Trix editor in multiple places and require different levels of functionality in some of those places. We're currently hiding some of the formatting buttons using CSS but for the reasons mentioned in this issue it would be cleaner to be able to have multiple configurations. I like the per instance override idea @coffeeshopped alluded to.
I get the feeling this won't happen unless someone decides to contribute this feature from the community. Maybe it's only just on the cusp of annoying for most people! :D