Skip to content

Special Characters and Emoji in Vue 3 ​

For Vue 3 apps, @erag/text-editor-vue offers a categorized symbol dialog and an emoji picker under the Insert menu. Turn them on with special-character and emoji in the plugins list of your :init object. Each pick is placed at the saved caret position and becomes part of the bound v-model HTML.

The Insert menu itself is configured in menubar customization, and styling such as bold or colors is covered in text formatting.


Configuration ​

Enable the special-character plugin:

vue
<script setup lang="ts">
import { shallowRef } from 'vue';
import { Editor, type EditorInit } from '@erag/text-editor-vue';

const content = shallowRef('');

const editorConfig: EditorInit = {
    plugins: ['special-character', 'emoji'],
    menubar: ['insert'],
    toolbar: 'undo redo | blocks | bold italic | removeformat',
};
</script>

<template>
    <Editor v-model="content" :init="editorConfig" />
</template>

Categories and Features ​

Opening Insert → Special character launches a categorized modal:

  • 🔍 Search Input: Live filter across all characters by name or symbol.
  • 🔣 Category Tabs:
    • Currency: €, £, ¥, ₹, ¢, ¤, ₠, ₢, ₣, ₤, ₱
    • Quotations: «, », “, ”, ‘, ’, ‹, ›, „
    • Mathematical: ±, ×, ÷, ≠, ≈, ≤, ≥, ∞, ∑, ∏, √, ∂, ∫
    • Symbols and Arrows: ©, ®, ™, §, , †, ‡, ←, ↑, →, ↓, ↔
    • Extended Latin and Greek: α, β, γ, δ, λ, π, Ω, Æ, Ø, Å

Clicking any symbol instantly inserts it at the active editor selection caret and closes the dialog.

Emoji picker ​

Insert → Emoji opens a separate searchable, categorized emoji picker. special-character and emoji are plugin names; neither is a toolbar keyword. Keep both in plugins when you want both Insert-menu actions.

Emoji categories include Smileys and People, Animals and Nature, Food and Drink, Activity, Travel and Places, Objects, Symbols, and Flags. Search matches the emoji label, and selecting a result inserts its Unicode value at the saved caret.