@anyxml/where-cursor-in
v1.1.2
Published
查询光标在 anyxml 中的起始标签的具体位置
Downloads
14
Readme
@anyxml/where-cursor-in
查询光标在 anyxml 中的起始标签的具体位置。可用于编辑器中提示后续的补全内容。
Installation
npm i @anyxml/where-cursor-in
Usage
import { whereCursorIn } from '@anyxml/where-cursor-in'
const cursorIndex = 3
whereCursorIn('<div class="xx" />', cursorIndex, { /* Configure */ })
// output: { id: 1, offset: 2, currentTag: 'div' }
Support Configure
Changelog
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.