> For the complete documentation index, see [llms.txt](https://2600hz.gitbook.io/sds/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2600hz.gitbook.io/sds/sds-3.0/sds-components/components/wysiwyg.md).

# Wysiwyg

### Use Cases for WYSIWYG Editor:

✅ **Displaying Formatting Success**: When a user successfully applies formatting to text, such as bold or italics, display a success message. For example: "Text formatted successfully."

✅ **Error Handling**: If an error occurs while performing an action like saving or loading a document, show an error message. For instance: "Error: Unable to save document. Please try again."

✅ **Informative Notifications**: Provide informative messages or notifications for relevant events, like autosave completion. Example: "Autosave successful. Your changes have been saved."

✅ **Warning Messages**: Alert users about potential issues, such as loss of unsaved changes when navigating away from the page. Example: "Warning: You have unsaved changes. Leaving now will discard them."

### Not-to-Use Cases for WYSIWYG Editor:

❌ **Displaying Critical System Errors**: Critical errors that require immediate attention, like server connection failures, should not be handled with simple notifications. Instead, use a comprehensive error handling system with prominent alerts and possible fallback mechanisms.

❌ **Showing Lengthy Instructions or Explanations**: WYSIWYG editors are not suitable for displaying long or complex messages with detailed instructions. Keep messages concise and to the point.

❌ **Using WYSIWYG for Interactive Components**: Avoid using the editor for interactive components or forms that require user input beyond text editing. Utilize dedicated UI elements like forms or modals for such interactions, maintaining a clear separation of concerns.
