From eb020021b8d0bcc16c5396366d175fc2d7d907b0 Mon Sep 17 00:00:00 2001 From: Shams mosowi Date: Wed, 20 May 2020 13:57:20 +0800 Subject: [PATCH] rich text code editor --- www/src/components/RichText.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/src/components/RichText.tsx b/www/src/components/RichText.tsx index 7d57f180..83f13fa4 100644 --- a/www/src/components/RichText.tsx +++ b/www/src/components/RichText.tsx @@ -11,6 +11,7 @@ import "tinymce/plugins/link"; import "tinymce/plugins/image"; import "tinymce/plugins/paste"; import "tinymce/plugins/help"; +import "tinymce/plugins/code"; import { Editor } from "@tinymce/tinymce-react"; import { makeStyles, createStyles } from "@material-ui/core"; @@ -101,10 +102,10 @@ export default function RichText({ value, onChange }: IRichTextProps) { init={{ minHeight: 300, menubar: false, - plugins: ["autoresize", "lists link image", "paste help"], + plugins: ["autoresize", "lists link image", "paste help", "code"], statusbar: false, toolbar: - "formatselect | bold italic forecolor | link | bullist numlist outdent indent | removeformat | help", + "formatselect | bold italic forecolor | link | bullist numlist outdent indent | removeformat code | help", skin: false, content_css: [ "https://use.typekit.net/ngg8buf.css",