Skip to content

Commit

Permalink
* feat(NoteEditorMobileModal.tsx): add HeadingToggle component to Not…
Browse files Browse the repository at this point in the history
…eEditorMobileModal

* feat(NoteEditorMobileModalV2.tsx): remove unnecessary imports and update toolbarContents in toolbarPlugin
  • Loading branch information
hereAlexT committed Dec 18, 2023
1 parent af79009 commit 669aea2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from "../Icons";
import EditorButton from "./EditorButton";
import { SparkMde } from "./Mde";
import HeadingToggle from "./MdxEditor/HeadingToggle";
import "./NoteEditorMobileModal.css";
import { Camera, CameraResultType } from "@capacitor/camera";
import {
Expand Down
36 changes: 5 additions & 31 deletions frontend/src/components/NoteEditor/NoteEditorMobileModalV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,52 +18,28 @@ import {
Quote,
} from "../Icons";
import EditorButton from "./EditorButton";
import { SparkMde } from "./Mde";
import HeadingToggle from "./MdxEditor/HeadingToggle";
import "./NoteEditorMobileModal.css";
import { Camera, CameraResultType } from "@capacitor/camera";
import {
IonButton,
IonIcon,
IonModal,
IonToolbar,
IonFooter,
IonCol,
IonGrid,
IonHeader,
IonButtons,
IonRow,
IonContent,
} from "@ionic/react";
import {
MDXEditor,
headingsPlugin,
toolbarPlugin,
listsPlugin,
UndoRedo,
KitchenSinkToolbar,
quotePlugin,
linkPlugin,
linkDialogPlugin,
imagePlugin,
tablePlugin,
thematicBreakPlugin,
frontmatterPlugin,
codeBlockPlugin,
sandpackPlugin,
codeMirrorPlugin,
directivesPlugin,
AdmonitionDirectiveDescriptor,
diffSourcePlugin,
markdownShortcutPlugin,
SandpackConfig,
BoldItalicUnderlineToggles,
ListsToggle,
BlockTypeSelect,
Separator,
Select,
Button,
headingsPluginHooks,
corePluginHooks,
BoldItalicUnderlineToggles,
} from "@mdxeditor/editor";
import clsx from "clsx";
import {
Expand Down Expand Up @@ -252,13 +228,11 @@ const CardEditorMobileModalV2: React.FC<CardEditorMobileProps> = ({
toolbarPlugin({
toolbarContents: () => (
<>
<Button
onClick={() => console.log("Button clicked!")}
></Button>
<UndoRedo />
<Button>
<HeadingToggle />
</Button>
<BoldItalicUnderlineToggles />
<ListsToggle />
<BlockTypeSelect />
{/* <SubmitButton
disabled={!isOnline || content.length === 0}
onClick={HandleOnSubmit}
Expand Down

0 comments on commit 669aea2

Please sign in to comment.