1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { Dialog, DialogTitle, DialogContent, DialogActions, Button, DialogContentText } from "@material-ui/core";
7 import { WithDialogProps } from "../../store/dialog/with-dialog";
8 import { withDialog } from '~/store/dialog/with-dialog';
9 import { RICH_TEXT_EDITOR_DIALOG_NAME } from "~/store/rich-text-editor-dialog/rich-text-editor-dialog-actions";
10 import RichTextEditor from 'react-rte';
12 export interface RichTextEditorDialogDataProps {
17 export const RichTextEditorDialog = withDialog(RICH_TEXT_EDITOR_DIALOG_NAME)(
18 (props: WithDialogProps<RichTextEditorDialogDataProps>) =>
19 <Dialog open={props.open}
20 onClose={props.closeDialog}
23 <DialogTitle>{props.data.title}</DialogTitle>
26 value={RichTextEditor.createValueFromString(props.data.text, 'html')}
33 onClick={props.closeDialog}>