Skip to content

Rich Text  #87

Open
Open
@cooper-joe

Description

@cooper-joe

Rich text

Summary

Rich text functionality is needed. Several apps allow users to enter text in different contexts. Some examples:

  • interpretations/comments in all analytics apps
  • notes in Capture app
  • dashboard items in Dashboards
  • custom forms in Capture app

These and many more user inputs need to support rich text. Different contexts will require different rich features, so the user interface will need to be flexible.

Discussion points

There are several main discussion points:

  • how to store/manipulate rich text? (html, markdown, etc.)
  • how to expose rich text controls to the user? (Toolbar, inline special characters)
    • should we use a third-party library? (draft, quill, etc.)
  • what rich text features will we include? (formatting, links, images, mentions, etc.)

What are we doing now?

Rich text is already available in Analytics interpretations. Should we use this as a starting point?

The user interface

The user interface could consist of two parts:

  • toolbar style, always available buttons that create and adjust formatting when clicked
  • inline markdown-style formatting/markup

The type of user interface to use will depend on the context. Dense, information rich UIs intended for tech-comfortable users will benefit from inline markup. A user with low tech literacy will benefit from Word-style formatting controls and WYSIWYG editing.

It is possible to combine these two interfaces and allow them to be used interchangeably via a toggle (as used in JIRA). Whether we do this, and how we do it, is a topic to discuss.

Next steps

To move this discussion forward, @dhis2/front-end please contribute experience, opinions and ideas for the above points. Thanks! :)

I have started work on some initial ideas for the user interface. This discussion will inform those designs, especially 'What rich text features will we include?'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions