Skip to content

How to programmatically pin rich text toolbar #11409

Answered by thibaudcolas
ilia4bit asked this question in Q&A
Discussion options

You must be logged in to vote

@ilia4bit good question – there is no way currently, though with the right amount of CSS overrides nothing is impossible. This isn’t officially supported but you could do this if you’re ok with changing the default for all fields:

// If the toolbar’s theme isn’t set, default to sticky.
if (!window.localStorage.getItem('wagtail:draftail-toolbar')) {
  window.localStorage.setItem('wagtail:draftail-toolbar', 'sticky');
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ilia4bit
Comment options

@thibaudcolas
Comment options

@ilia4bit
Comment options

Answer selected by ilia4bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants