#8901
Yutaka Emura
Keymaster

Hello owilsky,

You will need to load the Config object into the memory before you can modify and save it. Please rewrite like this:

#title = "Marks" 
#tooltip = "Toggle Marks ON/OFF"

editor.ExecuteCommandByID(4370); //EEID_VIEW_MARKS (4370)
cfg = document.Config;
if(cfg.Mark.ShowReturns) cfg.Mark.ShowSpaces = true;
else cfg.Mark.ShowSpaces = false;

cfg.Save();