-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable toolbar and formatting attributes #143
Conversation
javan
commented
Dec 23, 2015
•
edited
Loading
edited
- API for extending and customizing the toolbar
- Documentation
Any idea when this is likely to be merged? Waiting for this feature is blocking us from switching to Trix from our existing editor. |
Same as @existent-co-uk. Any word on this? |
53b3a48
to
8740f45
Compare
Is this ready to use? |
What's the status of this PR? Would be a great addition to an already great tool. |
This reverts commit 50ba8da.
…string or element)
8740f45
to
cbd60ae
Compare
As it seems only the docs are missing. Is that correct? I would like to see this feature be merge soonish into trix. How can I help? |
Any chance of getting that merged? |
For people coming across this like I was, the following solution worked for me: I basically overwrote let { makeFragment } = Trix;
let { lang } = Trix.config;
Trix.config.toolbar = {
content: makeFragment(`
<div class="button_groups">
<span class="button_group text_tools">
<button type="button" class="bold" data-attribute="bold" data-key="b" title="${lang.bold}">${lang.bold}</button>
<button type="button" class="italic" data-attribute="italic" data-key="i" title="${lang.italic}">${lang.italic}</button>
<button type="button" class="link" data-attribute="href" data-action="link" data-key="k" title="${lang.link}">${lang.link}</button>
</span>
[...custom html]
</div>
`)
}; this will also give you control over the naming of the css classes in case they conflict with your code. |
PR dead? =/ |
Any updates on this? |
Hello, so sorry for letting this linger, and even more sorry to say that it's not going to be merged. We do really want the toolbar to be more customizable, but we'd like to rethink how the toolbar integrates with the editor first. Our ideal toolbar would be a standalone component that works with Trix's |
If you're interested, let's figure out what API Trix should expose to best allow you to build your own toolbar component. I'm pretty sure Trix will always ship with a default toolbar, but the ultimate path to customization is making it easy and straightforward to BYO. |
Since this has been quiet for over a year now, can somebody tell me what I can do now to customise the toolbar? Specifically, to replace the |