question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include theme settings in saveViewState/restoreViewState

See original GitHub issue

monaco-editor version: 0.9.0 Browser: Any OS: Any

There is the command “Toggle High Contrast Theme” which does not appear to be stored/restored by the *ViewState functions. Calls to monaco.editor.setTheme also don’t seem to be preserved, but maybe that’s the same thing.

I guess this might be because the themes are not an editor specific, but rather a global setting?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mbarkhaucommented, Aug 10, 2017

Ok then, i guess i will have to store the theme info separately. Thank you.

0reactions
alexdimacommented, Aug 10, 2017

Yes, editor.saveViewState stores:

  • cursor position
  • scroll location
  • folded sections for a certain model when it is connected to an editor instance.

Once the same model is connected to the same or a different editor instance, editor.restoreViewState can be used to restore the above listed state.

There are very many things that influence how rendering occurs:

  • the current theme
  • the current wrapping settings set on the editor
  • the enablement of a minimap, etc.
  • the current language configured for a model
  • etc.

But these two methods are about reusing the same instance of an editor with multiple intances of a model and being able to serialize that state via JSON.stringify in a persistent location.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theme settings - Shopify Help Center
You can use theme settings to make changes to your online store's typography, colors, social media links, and checkout settings. You can use...
Read more >
Settings - Shopify.dev
Explore the informational settings that you can add to your theme. Location. Anchor link to section titled "Location". You can create settings in...
Read more >
Creating advanced theme settings - Drupal
In the Drupal administration section, each theme has its own settings page at admin/appearance/settings/themeName. And this page has a form.
Read more >
How to Create Theme Settings - YouTube
In this video, Liam will show you how to set up a custom social media icon, that is linked to the global settings...
Read more >
Theme settings • Stiletto Shopify Theme • Help ... - Fluorescent
Use the Theme settings to make changes to your online store's general styles and feature options that apply to your entire site. Click...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found