Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Expose mode and getTokenAt() on editorΒ #804

Closed

Description

@gruehle

This is related to #803

While writing the "Inline Editor for JavaScript functions" and "Inline Image Viewer" extensions, I needed to access the "private" _codeMirror property in order to get the current mode (using getOption("mode")) and call the getTokenAt() function.

We should either expose these on Editor, or consider just making the _codeMirror property public.

Activity

  1. njx commented on May 8, 2012

    @njx

    To @peterflynn and @gruehle to talk about along with #803.

  2. peterflynn commented on May 24, 2012

    @peterflynn
    Member

    Pull #923 fixed half of this by adding an Editor.getModeForSelection() API. For the remaining half (getTokenAt()) we're still not really sure how much (if any) we should try to abstract away the CodeMirror tokenizer APIs.

  3. peterflynn commented on Mar 28, 2013

    @peterflynn
    Member

    The existing TokenUtils abstracts away getTokenAt() reasonably well, and the new 'token stream' I'm working on will do so even more cleanly. After that we may be able to close this.

  4. ficristo commented on Dec 31, 2015

    @ficristo
    Collaborator

    Is there still something to do here? Has "token stream" landed?

  5. marcelgerber commented on Feb 19, 2016

    @marcelgerber
    Contributor

    I guess this can be closed now, as we've managed to achieve everything we need from our TokenUtils implementation.
    Thanks for noticing, @ficristo (and yeah, it's been some time, I'm catching up with my mail again ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions