Closed sigaloid closed 3 years ago
Hi, do you have a "fresh" installation or did you use trilium before and you upgraded to latest version?
Could you post a screenshot of the custom widget (so that attributes are shown too)?
Fresh install. I did choose frontend, ran, then refreshed. Did not seem to change it.
I also tried below (doesn't check for label or notetype)
if (note.type !== 'text' || !note.hasLabel('wordCount')) {
//this.toggleInt(false); // hide
return;
}
just so it's not an issue of labeling. But that did not make it show up :disappointed:
Also, it does have the wordCount inherited attribute, if that matters. I made root have wordCount, then made it inheritable. Could that be an issue?
The note is missing widget
label. Otherwise Trilium doesn't know that this note is supposed to be used as a widget.
Aha! Thank you. Another case of not reading docs carefully enough. :disappointed_relieved:
Wiki link for future reference: https://github.com/zadam/trilium/wiki/Custom-Widget
1224 does not solve this, I still do not see the word count. I've edited the code to not check attribute nor whether the note is text, but it still does not show up. Has anyone else got this to work? (I'd include logs, but I bet this is a JS/CSS issue just like #1224, and not a Trilium error that logs will fix. Willing to attach logs if necessary)
App version: 0.45.8 DB version: 170 Sync version: 16 Build date: 2021-01-11T22:29:31+01:00