Skip to content
Snippets Groups Projects
Commit 1c659d16 authored by xaralis's avatar xaralis
Browse files

feat: improved markdown support

parent 48670c46
Branches
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ const MarkdownEditor = ({ ...@@ -17,7 +17,7 @@ const MarkdownEditor = ({
const [selectedTab, setSelectedTab] = useState("write"); const [selectedTab, setSelectedTab] = useState("write");
const classes = { const classes = {
preview: "content-block p-2 border border-grey-200", preview: "p-2 content-block text-input",
textArea: "p-2 text-input text-base", textArea: "p-2 text-input text-base",
}; };
......
...@@ -52,6 +52,11 @@ const PostEditModal = ({ ...@@ -52,6 +52,11 @@ const PostEditModal = ({
: null : null
} }
placeholder="Vyplňte text příspěvku" placeholder="Vyplňte text příspěvku"
toolbarCommands={[
["header", "bold", "italic", "strikethrough"],
["link", "quote", "image"],
["unordered-list", "ordered-list"],
]}
/> />
{error && ( {error && (
<ErrorMessage className="mt-2"> <ErrorMessage className="mt-2">
......
...@@ -92,6 +92,11 @@ const AddPostForm = ({ className }) => { ...@@ -92,6 +92,11 @@ const AddPostForm = ({ className }) => {
: null : null
} }
placeholder="Vyplňte text vašeho příspěvku" placeholder="Vyplňte text vašeho příspěvku"
toolbarCommands={[
["header", "bold", "italic", "strikethrough"],
["link", "quote", "image"],
["unordered-list", "ordered-list"],
]}
/> />
<div className="space-x-4"> <div className="space-x-4">
......
...@@ -12,7 +12,7 @@ export const markdownConverter = new Showdown.Converter({ ...@@ -12,7 +12,7 @@ export const markdownConverter = new Showdown.Converter({
tables: true, tables: true,
simplifiedAutoLink: true, simplifiedAutoLink: true,
strikethrough: true, strikethrough: true,
tasklists: true, tasklists: false,
omitExtraWLInCodeBlocks: true, omitExtraWLInCodeBlocks: true,
noHeaderId: true, noHeaderId: true,
headerLevelStart: 2, headerLevelStart: 2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment