Skip to content
Discussion options

You must be logged in to vote

For what it's worth, here's the script I ended up with. It's quite crude, since it operates on the HTML returned by getContent but for now it gets the job done.

/*
 * Custom widget: Colors all the TODO, WIP, BLOCKED, DONE, etc. words that it finds.
 * To activate, label the note (or a parent) with `todoColorizer`.
 */

const TPL = `<div style="padding: 10px; border-top: 1px solid var(--main-border-color); contain: none;">
    <button class="show-lis-btn">Show List Items</button>
</div>`;

class todoColorizer extends api.NoteContextAwareWidget {
    get position() { return 100; }          // position in the center pane (bottom)
    get parentWidget() { return 'center-pane'; }

    doRender() 

Replies: 2 comments 2 replies

Comment options

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

@dosubot
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by bergercookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant