Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9027743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:49:07+00:00 2026-06-16T06:49:07+00:00

I just upgraded CodeMirror to latest and have the following code now breaking: //

  • 0

I just upgraded CodeMirror to latest and have the following code now breaking:

        // clear previous errors from editor window
        for (var i = 0; i < layoutCodeEditor.lineCount(); i++) {
            layoutCodeEditor.clearMarker(i);
            layoutCodeEditor.setLineClass(i, null, null);
        }

        var valid = JSLINT(code);
        var jsLintError = "";
        if (!valid) {
            jsLintError = JSLINT.error_report(JSLINT.data());
            _.chain(JSLINT.errors).compact().each(function(e){
                // show markers in the code edit window against lines with Jslint errors
                layoutCodeEditor.setMarker((+e.line) - 1, "●", "errors");
                layoutCodeEditor.setLineClass(+(e.line) - 1, null, "errorLine");                    
            })
        }

seems like the setMarker/clearMarker and setLineClass functions have been removed. What’s their equivalents now?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:49:08+00:00Added an answer on June 16, 2026 at 6:49 am

    These changes, among many others, are covered in the Upgrading to version 3 page on the CodeMirror site.

    The marker functions have changed as a consequence of moving to multiple gutters:

    Gutter model

    In CodeMirror 2.x, there was a single gutter, and line
    markers created with setMarker would have to somehow coexist with the
    line numbers (if present). Version 3 allows you to specify an array of
    gutters, by class name, use setGutterMarker to add or remove markers
    in individual gutters, and clear whole gutters with clearGutter.
    Gutter markers are now specified as DOM nodes, rather than HTML
    snippets.

    The gutters no longer horizontally scrolls along with the content. The
    fixedGutter option was removed (since it is now the only behavior).

    The line class change is more straightforward:

    Line CSS classes

    The setLineClass method has been replaced by
    addLineClass and removeLineClass, which allow more modular control
    over the classes attached to a line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just upgraded to the latest version of the SDK (version 19) and now
I just upgraded from SnowLeapord to Lion and now cannot create virtualenvs. I understand
I just upgraded from VS2010 RC to RTM. Now my areas aren't working. I
I just upgraded from rails 2.3.5 to rails 2.3.8, but now my redirects are
I just upgraded from VS C# Express and VS would mark my errors on
I just upgraded from Xcode 4 to Xcode 4.2 and now I'm getting the
I just upgraded from Flash Builder 4.5 to Flash Builder 4.6. Now when I
I just upgraded to TortoiseHg 2.0 and now my Push to / Pull from
I just upgraded packages in an MVC 3 project (ASP.net 4), and now I
I just upgraded my Android SDK, ADT and Proguard to the latest and greatest.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.