mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
added Ordered List
added Ordered List
This commit is contained in:
parent
c7061a26fa
commit
0bd6c06987
3 changed files with 10 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ site_description: LearnHouse is an open-source platform tailored for learning ex
|
||||||
contact_email: hi@learnhouse.app
|
contact_email: hi@learnhouse.app
|
||||||
|
|
||||||
general:
|
general:
|
||||||
development_mode: false
|
development_mode: true
|
||||||
install_mode: false
|
install_mode: false
|
||||||
|
|
||||||
security:
|
security:
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ import QuizBlock from "./Extensions/Quiz/QuizBlock";
|
||||||
import ToolTip from "@components/StyledElements/Tooltip/Tooltip";
|
import ToolTip from "@components/StyledElements/Tooltip/Tooltip";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { getCourseThumbnailMediaDirectory } from "@services/media/media";
|
import { getCourseThumbnailMediaDirectory } from "@services/media/media";
|
||||||
|
import { OrderedList } from "@tiptap/extension-ordered-list";
|
||||||
|
import {ListItem} from '@tiptap/extension-list-item'
|
||||||
|
|
||||||
|
|
||||||
interface Editor {
|
interface Editor {
|
||||||
content: string;
|
content: string;
|
||||||
|
|
@ -80,6 +83,8 @@ function Editor(props: Editor) {
|
||||||
controls: true,
|
controls: true,
|
||||||
modestBranding: true,
|
modestBranding: true,
|
||||||
}),
|
}),
|
||||||
|
OrderedList.configure(),
|
||||||
|
|
||||||
// Register the document with Tiptap
|
// Register the document with Tiptap
|
||||||
// Collaboration.configure({
|
// Collaboration.configure({
|
||||||
// document: props.ydoc,
|
// document: props.ydoc,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { FontBoldIcon, FontItalicIcon, StrikethroughIcon, ArrowLeftIcon, ArrowRightIcon, OpacityIcon, DividerVerticalIcon } from "@radix-ui/react-icons";
|
import { FontBoldIcon, FontItalicIcon, StrikethroughIcon, ArrowLeftIcon, ArrowRightIcon, OpacityIcon, DividerVerticalIcon } from "@radix-ui/react-icons";
|
||||||
import { AlertCircle, AlertTriangle, FileText, GraduationCap, ImagePlus, Info, Sigma, Video, Youtube } from "lucide-react";
|
import { AlertCircle, AlertTriangle, FileText, GraduationCap, ImagePlus, Info, Sigma, Video, Youtube, ListOrdered } from "lucide-react";
|
||||||
import ToolTip from "@components/StyledElements/Tooltip/Tooltip";
|
import ToolTip from "@components/StyledElements/Tooltip/Tooltip";
|
||||||
|
|
||||||
export const ToolbarButtons = ({ editor, props }: any) => {
|
export const ToolbarButtons = ({ editor, props }: any) => {
|
||||||
|
|
@ -39,6 +39,9 @@ export const ToolbarButtons = ({ editor, props }: any) => {
|
||||||
<ToolBtn onClick={() => editor.chain().focus().toggleStrike().run()} className={editor.isActive("strike") ? "is-active" : ""}>
|
<ToolBtn onClick={() => editor.chain().focus().toggleStrike().run()} className={editor.isActive("strike") ? "is-active" : ""}>
|
||||||
<StrikethroughIcon />
|
<StrikethroughIcon />
|
||||||
</ToolBtn>
|
</ToolBtn>
|
||||||
|
<ToolBtn onClick={() => editor.chain().focus().toggleOrderedList().run()} className={editor.isActive('orderedList') ? 'is-active' : ''}>
|
||||||
|
<ListOrdered />
|
||||||
|
</ToolBtn>
|
||||||
<ToolSelect
|
<ToolSelect
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
editor
|
editor
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue