# wangEditor hashtag plugin [中文文档](./README.md) ## Introduction **Fork from https://github.com/wangeditor-team/wangEditor-plugin-mention** [wangEditor](https://www.wangeditor.com/en/) hashtag plugin, like `#James`.  ## Installation ```shell yarn add wangeditor-hashtag-plugin ``` ## Usage [Vue demo source code](https://github.com/wangfupeng1988/vue2-wangeditor-demo/blob/master/src/components/MyEditorWithMention.vue) ### Use in editor ```ts import { IDomEditor, Boot, IEditorConfig } from '@wangeditor/editor' import hashtagModule, { HashtagElement } from 'wangeditor-hashtag-plugin' // Register // You should register this before create editor, and register only once (not repeatedly). Boot.registerModule(hashtagModule) // Show your modal function showModal(editor: IDomEditor) { // Get cursor's position info, to set modal position const domSelection = document.getSelection() const domRange = domSelection.getRangeAt(0) if (domRange == null) return const selectionRect = domRange.getBoundingClientRect() // Get editor container's position info, maybe help to get right modal position const containerRect = editor.getEditableContainer().getBoundingClientRect() // Show your modal, and set position // PS: You must implement the modal yourself, use