TODO: Check out https://github.com/qard/remark-lint-code and https://www.npmjs.com/package/remark-lint-code-eslint ; add below to CHANGES
- Docs (JSDocs) Switch to JS-based config file - Leverage syntax highlighting reporting of JSDoc to lint our code (npm version does not seem to reflect that on Github, so we use Github version we need) - Docs (ESLint): Apply most of our ESLint rules (except `no-undefined` and `padded-blocks`) to sample code blocks
This commit is contained in:
@@ -136,13 +136,13 @@ As a URL parameter, one can pre-load an SVG file in the following manner:
|
||||
|
||||
```js
|
||||
// Data URI
|
||||
'?source=' + encodeURIComponent('data:image/svg+xml;utf8,' + /*...*/);
|
||||
location.href += '?source=' + encodeURIComponent('data:image/svg+xml;utf8,' + svgText);
|
||||
|
||||
// Data URI (base 64):
|
||||
'?source=' + encodeURIComponent('data:image/svg+xml;base64,' + /* ... */); // data%3Aimage%2Fsvg%2Bxml%3Bbase64%2C ...
|
||||
location.href += '?source=' + encodeURIComponent('data:image/svg+xml;base64,' + svgTextAsBase64); // data%3Aimage%2Fsvg%2Bxml%3Bbase64%2C ...
|
||||
|
||||
// Local URL:
|
||||
'?url=' + encodeURIComponent('images/logo.svg'); // images%2Flogo.svg
|
||||
location.href += '?url=' + encodeURIComponent('images/logo.svg'); // images%2Flogo.svg
|
||||
```
|
||||
|
||||
**Note:** There is currently a bug that prevents data URIs ending with
|
||||
|
||||
@@ -8,9 +8,9 @@ the SVG file differently:
|
||||
### Example
|
||||
```js
|
||||
svgEditor.setCustomHandlers({
|
||||
save (win, data) {
|
||||
// Save svg
|
||||
}
|
||||
save (win, data) {
|
||||
// Save svg
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
@@ -76,14 +76,14 @@ export default {
|
||||
name: 'helloworld',
|
||||
init () {
|
||||
return {
|
||||
svgicons: 'extensions/helloworld-icon.xml',
|
||||
buttons: [{...}],
|
||||
mouseDown () {
|
||||
...
|
||||
},
|
||||
mouseUp (opts) {
|
||||
...
|
||||
}
|
||||
svgicons: 'extensions/helloworld-icon.xml',
|
||||
buttons: [{ /* ... */ }],
|
||||
mouseDown () {
|
||||
// ...
|
||||
},
|
||||
mouseUp (opts) {
|
||||
// ...
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -149,6 +149,7 @@ const localeStrings = await importSetGlobalDefault(url, {
|
||||
});
|
||||
|
||||
// Use `localeStrings`
|
||||
console.log(localeStrings);
|
||||
|
||||
})();
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user