Remove dropdown on certain buttons #974
|
For the following buttons, it has a dropdown option to select more options. Is there a way to remove or change these dropdown options?
|
Replies: 3 comments 2 replies
|
I wanted to ged rid of the options in UL completely. The only solution I found was reducing the options to the default option |
|
I used css to remove the redundant arrows I didn't want like so. Notice the <style>
[aria-label*="Align" i] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label^="Font"] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label*="Insert" i] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label="Line height"] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label*="split" i] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label="Background"] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label^="Fill"] .jodit-toolbar-button__trigger{
display: none !important;
}
[aria-label^="Paste"] .jodit-toolbar-button__trigger{
display: none !important;
}
</style>You can do this in the controls to change options Jodit.make('#editor', {
controls: {
paragraph: {
list: Jodit.atom({
p: 'Normal',
h2: 'Heading 2',
h3: 'Heading 3',
}),
}, |
|
Two ways depending on what you want. To change or trim the options in a dropdown, override that control's (Both approaches are already in the thread — credit to the folks above.) |
Two ways depending on what you want. To change or trim the options in a dropdown, override that control's
listwithJodit.atom, e.g.controls: { ul: { list: Jodit.atom({ default: 'Default' }) } }—Jodit.atomstops it merging back into the defaults. To drop the little arrow entirely and keep just the main action, hide the trigger in CSS:[aria-label*="Align" i] .jodit-toolbar-button__trigger { display: none }.(Both approaches are already in the thread — credit to the folks above.)