import type { ReportElements } from '@buster/database'; import { describe, expect, it } from 'vitest'; import { markdownToPlatejs, platejsToMarkdown } from './platejs-conversions'; describe('markdownToPlatejs', () => { it('should convert elaborate markdown to platejs', async () => { const markdown = `# Welcome to the Plate Playground! Experience a modern rich-text editor built with [Slate](https://slatejs.org) and [React](https://reactjs.org). This playground showcases just a part of Plate's capabilities. [Explore the documentation](/docs) to discover more. ## Collaborative Editing Review and refine content seamlessly. Use [](/docs/suggestion) or to . Discuss changes using [comments](/docs/comment) on many text segments. You can even have annotations! ## AI-Powered Editing Boost your productivity with integrated [AI SDK](/docs/ai). Press ⌘+J or Space in an empty line to: * Generate content (continue writing, summarize, explain) * Edit existing text (improve, fix grammar, change tone) ## Rich Content Editing Structure your content with [headings](/docs/heading), [lists](/docs/list), and [quotes](/docs/blockquote). Apply [marks](/docs/basic-marks) like **bold**, _italic_, underline, ~~strikethrough~~, and \`code\`. Use [autoformatting](/docs/autoformat) for [Markdown](/docs/markdown)-like shortcuts (e.g., \\* for lists, # for H1). > Blockquotes are great for highlighting important information. \`\`\`javascript function hello() { console.info('Code blocks are supported!'); } \`\`\` Create [links](/docs/link), [@mention](/docs/mention) users like [Alice](mention:Alice), or insert [emojis](/docs/emoji) ✨. Use the [slash command](/docs/slash-command) (/) for quick access to elements. ### How Plate Compares Plate offers many features out-of-the-box as free, open-source plugins. | **Feature** | **Plate (Free & OSS)** | **Tiptap** | | ------------------- | ---------------------- | --------------------- | | AI | ✅ | Paid Extension | | Comments | ✅ | Paid Extension | | Suggestions | ✅ | Paid (Comments Pro) | | Emoji Picker | ✅ | Paid Extension | | Table of Contents | ✅ | Paid Extension | | Drag Handle | ✅ | Paid Extension | | Collaboration (Yjs) | ✅ | Hocuspocus (OSS/Paid) | ### Images and Media Embed rich media like images directly in your content. Supports [Media uploads](/docs/media) and [drag & drop](/docs/dnd) for a smooth experience. ![](https://images.unsplash.com/photo-1712688930249-98e1963af7bd?q=80\\&w=600\\&auto=format\\&fit=crop\\&ixlib=rb-4.0.3\\&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)