Selaa lähdekoodia

remove markdown checkbox from CommentEditor

yuken 3 vuotta sitten
vanhempi
sitoutus
61b17c6b96
1 muutettua tiedostoa jossa 0 lisäystä ja 30 poistoa
  1. 0 30
      packages/app/src/components/PageComment/CommentEditor.tsx

+ 0 - 30
packages/app/src/components/PageComment/CommentEditor.tsx

@@ -59,7 +59,6 @@ type PropsType = {
 }
 
 type EditorRef = {
-  setGfmMode: (value: boolean) => void,
   setValue: (value: string) => void,
   insertText: (text: string) => void,
   terminateUploadingState: () => void,
@@ -97,14 +96,6 @@ const CommentEditor = (props: PropsType): JSX.Element => {
     setComment(value);
   };
 
-  const updateStateCheckbox = (event) => {
-    if (editorRef.current == null) { return }
-    const value = event.target.checked;
-    setIsMarkdown(value);
-    // changeMode
-    editorRef.current.setGfmMode(value);
-  };
-
   const renderHtml = (markdown: string) => {
     const context = {
       markdown,
@@ -351,27 +342,6 @@ const CommentEditor = (props: PropsType): JSX.Element => {
 
         <div className="comment-submit">
           <div className="d-flex">
-            <label className="mr-2">
-              {activeTab === 'comment_editor' && (
-                <span className="custom-control custom-checkbox">
-                  <input
-                    type="checkbox"
-                    className="custom-control-input"
-                    id="comment-form-is-markdown"
-                    name="isMarkdown"
-                    checked={isMarkdown}
-                    value="1"
-                    onChange={updateStateCheckbox}
-                  />
-                  <label
-                    className="ml-2 custom-control-label"
-                    htmlFor="comment-form-is-markdown"
-                  >
-                    Markdown
-                  </label>
-                </span>
-              ) }
-            </label>
             <span className="flex-grow-1" />
             <span className="d-none d-sm-inline">{ errorMessage && errorMessage }</span>