瀏覽代碼

Add hc-black toggle

Alex Dima 9 年之前
父節點
當前提交
6047f09f96
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      test/index.js

+ 6 - 0
test/index.js

@@ -219,6 +219,12 @@ function createOptions(editor) {
 		editor.updateOptions({ theme: newValue ? 'vs-dark' : 'vs' });
 	}));
 
+	options.appendChild(createOptionToggle(editor, 'hc-black', function(config) {
+		return config.viewInfo.theme === 'hc-black';
+	}, function(editor, newValue) {
+		editor.updateOptions({ theme: newValue ? 'hc-black' : 'vs' });
+	}));
+
 	options.appendChild(createOptionToggle(editor, 'readOnly', function(config) {
 		return config.readOnly;
 	}, function(editor, newValue) {