Dictionary Component


Dictionary Component

This component is available in the libs/integrations/invox-dialogs folder of the SDK.

The Dictionary Component is a modal window that allows word management. This high-level component is designed to be integrated quickly and easily in your web application.

Getting started

1. Import resources

<!-- Invox Dictation SDK - API -->
<script type="text/javascript" src="libs/invox.min.js" charset="UTF-8"></script>

<!-- Invox Dictation SDK - Dictionary Component -->
<script type="text/javascript" src="libs/integrations/invox-dialogs/invox-dictionary-component.min.js" charset="UTF-8"></script>
<link rel="stylesheet" href="libs/integrations/invox-dialogs/invox-dictionary-component.css">

2. Initialize component

  1. Create a container in the DOM. You can use the same container for all dialog components:
    <div id="invox-dialogs-container"></div>
    
  2. Create the component:
    const dictionaryDialog = INVOXMDComponent_Dictionary.create("invox-dialogs-container");
    

3. Show component

dictionaryDialog.show();

4. Hide component (optional)

The dialog can also be closed by pressing ESC or clicking the Close button.

dictionaryDialog.hide();

5. Remove component (optional)

dictionaryDialog.remove();

Public methods

create

const dictionaryDialog = INVOXMDComponent_Dictionary.create("invox-dialogs-container");

show

dictionaryDialog.show();

hide

dictionaryDialog.hide();

remove

dictionaryDialog.remove();

Customize design

At the beginning of invox-dictionary-component.css you can find CSS variables for easy customization:

VariableDescriptionDefault
--invox-dictionary-dialog__z-indexz-index700
--invox-dialogs-color__primaryPrimary color#52619f
--invox-dialogs-color__primary--hoverPrimary hover color#415491
--invox-dialogs-size__widthDialog width400px
--invox-dialogs-size__heightDialog height400px
--invox-dialogs-size__border-radiusBorder radius5px

How to use

Dictionary Component elements

  1. Help button — Displays the help view.
  2. Fullscreen button — Enlarges the view to full screen.
  3. Close button — Closes the dialog.
  4. List selector — Filter by user items, speciality items, or all items.
  5. Search bar — Search items by name.
  6. Shared item icon — Indicates the word is shared with users of the same speciality.
  7. Edit button — Modify the selected word.
  8. Close button — Close the dialog.
  9. New button — Create a new word.
  10. Resize handle — Drag to resize the dialog.