Skip to content

Expose lower-API to modify text and selection, and to query selection #69

@stepancheg

Description

@stepancheg

Editor component could have public functions like:

// like HTMLTextareaElement
selectionStart: number
selectionEnd: number
setSelectionRange(start, end)
setValue(text) // raw text; should apply highlighting, preserve selection and amend history

API to selection could be needed to enable button behaviour depending on where the selection is (e. g. to implement "comment out" button if there's no comment on current line).

API to modify value can be useful for example, to implement "comment out" button mentioned above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions