static Editor createPreviewEditor(String text, EditorColorsScheme scheme, boolean editable) {
    EditorFactory editorFactory = EditorFactory.getInstance();
    Document editorDocument = editorFactory.createDocument(text);
    // enable editor popup toolbar
    FileDocumentManagerBase.registerDocument(editorDocument, new LightVirtualFile());
    EditorEx editor = (EditorEx) (editable ? editorFactory.createEditor(editorDocument) : editorFactory.createViewer(editorDocument));
    editor.setColorsScheme(scheme);
    EditorSettings settings = editor.getSettings();
    settings.setLineNumbersShown(false);
    settings.setWhitespacesShown(true);
    settings.setLineMarkerAreaShown(false);
    settings.setIndentGuidesShown(false);
    settings.setAdditionalColumnsCount(0);
    settings.setAdditionalLinesCount(0);
    settings.setRightMarginShown(true);
    settings.setRightMargin(60);
    settings.setGutterIconsShown(false);
    settings.setIndentGuidesShown(false);
    ((EditorGutterComponentEx)editor.getGutter()).setPaintBackground(false);
    return editor;
  }
static Editor createPreviewEditor(String text, EditorColorsScheme scheme, boolean editable)