Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

Ported the rich text editor from Edkit React to use Shadcn UI instead of Bootstrap.

Implementation

  • Editor Component: ContentEditable-based editor with MobX state management, integrated with Edkit's @editor decorator
  • Tool System:
    • Text formatting (bold, italic, underline, strikethrough, headings, font size, sub/superscript, links)
    • Color pickers for foreground/background colors
    • Layout tools (alignment, lists, horizontal rules)
    • Media insertion (images, audio, video, iframes)
    • Control operations (undo, redo, reset, clear)
    • Markdown export
  • UI Migration: Replaced Bootstrap buttons with Shadcn UI Button components, mapped Bootstrap Icons to Lucide React
  • Registry Entry: Component installable via npx shadcn-helper add https://mobx-restful-shadcn.idea2.app/r/editor.json

Usage

import { Editor, OriginalTools, ExtraTools } from "@/components/ui/editor";

<Editor
  tools={[...OriginalTools, ...ExtraTools]}
  name="content"
  defaultValue="Hello <b>Edkit</b>!"
  onChange={console.log}
/>

Screenshot

Editor Component

The toolbar displays all formatting options with Shadcn UI styling. Color pickers use native HTML color inputs overlaid with styled buttons.

Original prompt

基于 Shadcn UI 基础组件重新实现 https://github.com/idea2app/Edkit/tree/master/React

Human changes

  1. [optimize] simplify Copilot's source codes
  2. [remove] Example components

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 19, 2025 20:32
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
…EADME documentation

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copilot AI changed the title [WIP] Reimplement components based on Shadcn UI Reimplement Edkit editor components with Shadcn UI Dec 19, 2025
Copilot AI requested a review from TechQuery December 19, 2025 20:40
@TechQuery TechQuery marked this pull request as ready for review December 20, 2025 19:41
@TechQuery TechQuery changed the title Reimplement Edkit editor components with Shadcn UI [add] HTML Editor component with Edkit & Shadcn UI Dec 20, 2025
@TechQuery TechQuery merged commit 755bde1 into main Dec 20, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In progress to Done in 开源项目 Dec 20, 2025
@TechQuery TechQuery deleted the copilot/reimplement-shadcn-ui-components branch December 20, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants