Files
halo/ui/packages/editor
Ryan Wang 760ba2347b Optimize editor styles (#7982)
* Refactor list toolbar items and unify icon sizing

* Replace MDI icons with Mingcute icons in editor extensions

* Replace MDI icons with Mingcute and other icon sets

* Unify button styles and icon sizing in editor UI

* Refactor editor icons and remove BlockCard component

* Refactor CommandsView menu styles and structure

* Add transition-colors to interactive UI components

* Refactor toolbar and toolbox item props typing

* Refactor BubbleItem props to use shared type

* Fix optional chaining for isActive prop in LinkBubbleButton

* Replace MDI icons with Mingcute icons in editor UI

* Refactor editor layout and styles for improved flexibility

* Refactor editor layout and update styles

* Replace icon set in CodeBlockViewRenderer

* Extend props types for toolbar, bubble, and toolbox items

* Refactor bubble components into subfolder

* Add BubbleButton component and update usage

* Refactor dropdown and toolbar item components

* Add image position dropdown to image bubble menu

* Refactor editor extension isActive checks to use class names

* Refactor gallery bubble items to use new UI components

* Refactor iframe align actions into dedicated component

* Refactor video position bubble to dropdown component

* Refactor input components and unify input UI

* Increase input container width from w-60 to w-64

* Refactor video size UI and update link popper widths

* Add audio position alignment to editor extension

* Refactor iframe and video size controls, update icons

* Add ResourceReplaceButton and refactor media replace UI

* Add configurable gap for gallery items

* Increase group size options to 10 in gallery

Expanded the selectable group size options in BubbleItemGroupSize.vue from 6 to 10, allowing users to choose larger group sizes for gallery items.

* Add danger type to cover delete dropdown item

* Add auto-focus to Input components in editor bubbles

* Add top margin to GalleryView node wrapper
2025-12-10 14:37:45 +08:00
..
2025-12-10 14:37:45 +08:00
2024-02-02 22:22:51 +08:00
2025-11-28 13:02:34 +08:00
2024-02-02 22:22:51 +08:00
2024-02-02 22:22:51 +08:00
2024-02-02 22:22:51 +08:00
2025-11-28 13:02:34 +08:00

@halo-dev/richtext-editor

The default editor for Halo, built with Tiptap + ProseMirror.

⚠️ This package is not suitable for general editor use cases, as it is tightly coupled with Halo and uses some of Halo's built-in tools and shared dependencies. However, you can use it in Halo plugins just like you would use it in Halo itself.

Installation

In Halo plugins:

pnpm install @halo-dev/richtext-editor

Usage

<script setup lang="ts">
import {
  ExtensionsKit,
  RichTextEditor,
  VueEditor,
} from "@halo-dev/richtext-editor";
import { onMounted, ref, shallowRef } from "vue";

const editor = shallowRef<VueEditor>();
const content = ref("Hello World");

onMounted(() => {
  editor.value = new VueEditor({
    content: content.value,
    extensions: [ExtensionsKit],
    parseOptions: {
      preserveWhitespace: true,
    },
    onUpdate: () => {
      content.value = editor.value?.getHTML() || "";
    },
  });
});
</script>
<template>
  <RichTextEditor v-if="editor" :editor="editor" />
</template>

Requirements

  • Vue 3.5.x or higher
  • Halo plugin environment

License

GPL-3.0