Skip to content

Utility Request: insertTextWithTabStops #49

@amxmln

Description

@amxmln

Hi!

I’m currently building an extension that allows wrapping a selection with a snippet, which is very useful for example when working with HTML and wanting to wrap a word in <strong /> tags.

The snippets are using the same format as the autocomplete ones, so they have an insert and an array of tabStops, but unfortunately to recreate the insertion from the autocomplete plugin, I would have to duplicate a lot of the logic.

Would it be possible to create a new insertTextWithTabStops function that would allow inserting text into an editor, but also handle the tabStops?

This could then be used in insertOption() in the autocomplete plugin and exposed via an export in the utils module.

As always, thank you for this awesome library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions