Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Code color highlighting does not work on the Service Portal Widget Editor. - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Code color highlighting does not work on the Service Portal Widget Editor.
KB0781435

Code color highlighting does not work on the Service Portal Widget Editor.


1056 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

The article helps in fixing Code color highlighting on the Service Portal Widget Editor. 

  1. Navigate to Service portal widgets
    2. Open any widget
    3. In the related links section, Click on Open in Widget Editor

Expected: In the widget editor, the code should be highlighted in different colors
Actual: In the widget editor, the code is not highlighted in different colors and the whole code is shown in black.

When this happens the following error is seen in browser console.


js_includes_sp.jsx?v=11-11-2018_0542&lp=Wed_Nov_21_14_46_34_PST_2018&c=6_58:12319 ReferenceError: CodeMirror is not defined
at js_includes_sp.jsx?v=11-11-2018_0542&lp=Wed_Nov_21_14_46_34_PST_2018&c=6_58:62399
at js_includes_sp.jsx?v=11-11-2018_0542&lp=Wed_Nov_21_14_46_34_PST_2018&c=6_58:15400
at completeOutstandingRequest (js_includes_sp.jsx?v=11-11-2018_0542&lp=Wed_Nov_21_14_46_34_PST_2018&c=6_58:9011)
at js_includes_sp.jsx?v=11-11-2018_0542&lp=Wed_Nov_21_14_46_34_PST_2018&c=6_58:9140

Release

All releases

Cause

Missing sp_codemirror_includes dependency in the widget dependencies for the widget "widget-edit-panel"

Resolution

Add the sp_codemirror_includes dependency to the widget-edit-panel widget.

  1. Open widget "widget-edit-panel"
  2. Go to Dependencies Related list
  3. Click on Edit
  4. Select "sp_codemirror_includes"
  5. Click on Save

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.