Word Counter
ui link: https://musing-hawking-156433.netlify.app/
Word Counter Brief for Amnet
Functionality description:
- In the bottom right corner, we'll create a new Toolbar that eventually will include the counters info, shortcuts modal, and help.
- When the user has no text selected the counter should reflect the total words of the chapter.
- On text selection it should show the current selection counter. As the note's content is inline and saved in the annotation when a note is selected its text should be included in the count.
- Clicking the counter, should display the popover that exists in the design, with info for some additional counters. For now, tables, images, footnotes, and block-level nodes (paragraphs, titles, extracts, etc -- as one counter) should be enough. No need to bother with spelling mistakes or last saved for now.
Implementation Steps:
- Create a new Toolbar in Editoria's Layout in the right place as in the design. We can call it
InfoToolBar
or something similar. UseComponentPlugin
from the core to register the toolbar similar to how the rest of Editoria's toolbar are registered. - Add the toolbar in editoria's config MenuService.
- Create a new Toolgroup, again named something similar to
Info
, that eventually will contain all 3 tools that are mentioned above and add it in the config. - Create the New Counter Service with the relevant tool with all mentioned funcionality and add it to the tool group.
- Add all necessary CSS in Editoria's layout for positioning the newly created Toolbar.