# Class: NoteContextAwareWidget

## NoteContextAwareWidget()

This widget allows for changing and updating depending on the active note.

## Constructor

#### new NoteContextAwareWidget()

Source:
  - widgets/note_context_aware_widget.js, line 8

### Extends

- BasicWidget

### Members

#### hoistedNoteId

Source:
  - widgets/note_context_aware_widget.js, line 42

#### note

Source:
  - widgets/note_context_aware_widget.js, line 27

#### noteContext :NoteContext

##### Type:

- NoteContext

Source:
  - widgets/note_context_aware_widget.js, line 108

#### noteId

Source:
  - widgets/note_context_aware_widget.js, line 32

#### notePath

Source:
  - widgets/note_context_aware_widget.js, line 37

### Methods

#### cssBlock(block) → {this}

Accepts a string of CSS to add with the widget.

##### Parameters:

Name | Type | Description
--- | --- | ---
`block` | string |

Inherited From:
  - BasicWidget#cssBlock
Source:
  - widgets/basic_widget.js, line 78

##### Returns:

for chaining

Type
  this

#### doRender()

Method used for rendering the widget. Your class should override this method. The method is expected to create a this.$widget containing jQuery object

Inherited From:
  - BasicWidget#doRender
Source:
  - widgets/basic_widget.js, line 132

#### isEnabled() → {boolean}

Source:
  - widgets/note_context_aware_widget.js, line 53

##### Returns:

true when an active note exists

Type
  boolean

#### (async) refreshWithNote(note) → {Promise.<void>}

Override this method to be able to refresh your widget with each note.

##### Parameters:

Name | Type | Description
--- | --- | ---
`note` | FNote |

Source:
  - widgets/note_context_aware_widget.js, line 73

##### Returns:

Type
  Promise.<void>