This component no longer exists. It was in deso-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Editor Markdown
deso-ui/editor-markdownRemovedBlock
A markdown editor component for composing posts.
Install it
npx shadcn@latest add https://ui.deso.com/r/editor-markdown.jsonSource
1'use client';23import React, { useEffect, useRef } from 'react';4import { Crepe } from '@milkdown/crepe';5import '@milkdown/crepe/theme/common/style.css';6import { cn } from '@/lib/utils/deso';78export interface EditorMarkdownProps {9 value?: string;10 onChange?: (value: string) => void;11 placeholder?: string;12 className?: string;13 disabled?: boolean;14}1516export function EditorMarkdown({17 value = '',18 onChange,19 placeholder = 'Start writing...',20 className,21 disabled = false,22}: EditorMarkdownProps) {23 const editorRef = useRef<HTMLDivElement>(null);24 const crepeRef = useRef<Crepe | null>(null);2526 useEffect(() => {27 if (!editorRef.current) return;2829 // Initialize Crepe editor30 const crepe = new Crepe({31 root: editorRef.current,32 defaultValue: value,33 });3435 crepeRef.current = crepe;36 crepe.create();3738 return () => {39 if (crepeRef.current) {40 crepeRef.current.destroy();41 crepeRef.current = null;42 }43 };44 }, []);4546 return (47 <div48 ref={editorRef}49 className={cn(50 'prose prose-sm max-w-none focus:outline-none border-border rounded-md !p-0',51 disabled && 'opacity-50 cursor-not-allowed',52 className53 )}54 />55 );56}
