Skip to content
Discussion options

You must be logged in to vote

center-pane can also be utilized(another option). here is an example for your reference, you can ignore the implementation of button function:
``
const TPL = `

`;

class TGLButtonsWidget extends api.NoteContextAwareWidget {
get position() { return 1; }
get parentWidget() { return 'center-pane'; }

isEnabled() {
    return super.isEnabled() && this.note.type === 'text';
}

doRender() {
    super.doRender();
    this.$widget = $(TPL);
    this.$toc = this.$widget.find(".toc-toggle");
    this.$pad = this.$widget.find(".pad-toggle");
    this.$tbh = this.$widget.find(".tbh-toggle");
    this.$color = this.$widget.find(".color-toggle");
    this.$newline = this.$widget.find(".newline");

    t…

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@twicemice
Comment options

Comment options

You must be logged in to vote
2 replies
@fooyoo
Comment options

@twicemice
Comment options

Answer selected by twicemice
Comment options

You must be logged in to vote
1 reply
@fooyoo
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@twicemice
Comment options

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