@huawei-ide/codearts 1.0.53 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +5 -2
  2. package/index.js +9 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -162,5 +162,8 @@
162
162
  event.dispose();
163
163
  ```
164
164
 
165
- 20. 销毁 IDE
166
- `ide.dispose();`
165
+ 20. 开启Markdown文件的侧边预览功能,默认开启
166
+ `ide.enableMarkdownPreview(isEnable: boolean);`
167
+
168
+ 21. 销毁 IDE
169
+ `ide.dispose();`
package/index.js CHANGED
@@ -8,7 +8,7 @@ if (window.location.origin.endsWith('.net')) {
8
8
  }
9
9
  const iframe = document.createElement('iframe');
10
10
  iframe.id = 'codeartside';
11
- iframe.src = hcOrigin + '/codearts-core-web-static/1.0.87/resources/server/gitcode.html';
11
+ iframe.src = hcOrigin + '/codearts-core-web-static/1.0.90/resources/server/gitcode.html';
12
12
 
13
13
  const OS = getOS();
14
14
  const ON_DID_CHANGE = 'onDidChange';
@@ -211,6 +211,14 @@ export function setHighlightLineNumber(config) {
211
211
  postMessage(message);
212
212
  }
213
213
 
214
+ export function enableMarkdownPreview(isEnable) {
215
+ const message = {
216
+ type: 'enableMarkdownPreview',
217
+ data: isEnable
218
+ };
219
+ postMessage(message);
220
+ }
221
+
214
222
  function postMessage(message) {
215
223
  iframe.contentWindow.postMessage(message, hcOrigin);
216
224
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huawei-ide/codearts",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {