I need to change values of tokens dynamically, using custom mode that i wrote.
is it possible to change modes by passing delegate function of the mode, or maybe there is a better way.
I am implementing codemirror using angular 2.
thank you.
Yes, you can wrap a mode to create another mode. See for example the yaml-frontmatter mode in the distribution, or the mode/multiplex and mode/overlay addons.