mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
Updated Custom widget (markdown)
parent
6d8b40a3ea
commit
cd702b435b
@ -27,15 +27,15 @@ const TPL = `<div style="padding: 10px; border-top: 1px solid var(--main-border-
|
|||||||
<span class="character-count"></span>
|
<span class="character-count"></span>
|
||||||
</div`;
|
</div`;
|
||||||
|
|
||||||
class WordCountWidget extends api.TabAwareWidget {
|
class WordCountWidget extends api.NoteContextAwareWidget {
|
||||||
get position() { return 100; } // higher value means position towards the bottom/right
|
get position() { return 100; } // higher value means position towards the bottom/right
|
||||||
|
|
||||||
get parentWidget() { return 'center-pane'; }
|
get parentWidget() { return 'center-pane'; }
|
||||||
|
|
||||||
isEnabled() {
|
isEnabled() {
|
||||||
return super.isEnabled()
|
return super.isEnabled()
|
||||||
&& note.type === 'text'
|
&& this.note.type === 'text'
|
||||||
&& note.hasLabel('wordCount');
|
&& this.note.hasLabel('wordCount');
|
||||||
}
|
}
|
||||||
|
|
||||||
doRender() {
|
doRender() {
|
Loading…
x
Reference in New Issue
Block a user