@Override
    public void setErrorText(final String title, final String errorText) {

        final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder()
                .appendHtmlConstant("<div class=\"editor-error\">")
                .appendHtmlConstant("<p>")
                .append(SafeHtmlUtils.fromString(title))
                .appendHtmlConstant("</p>");

        if (errorText != null) {
            final String[] errorTextLines = errorText.split("\n");
            for (final String line : errorTextLines) {
                safeHtmlBuilder
                        .appendHtmlConstant("<p>")
                        .append(SafeHtmlUtils.fromString(line))
                        .appendHtmlConstant("</p>");
            }
        }

        safeHtmlBuilder.appendHtmlConstant("</div>");

        final ScrollPanel scrollPanel = new ScrollPanel();
        scrollPanel.addDomHandler(this::handleMouseDown, MouseDownEvent.getType());
        scrollPanel.getElement().addClassName("editor-error-container");
        scrollPanel.getElement().addClassName("max");
        scrollPanel.setWidget(new HTMLPanel(safeHtmlBuilder.toSafeHtml()).asWidget());
        content.setWidget(scrollPanel.asWidget());
    }
This is a widget that can be used to edit text. It provides useful
functionality such as formatting, styling, line numbers and warning/error
markers.
stroom-core-client-widget/src/main/java/stroom/editor/client/view/EditorViewImpl.java