Skip to content

Commit 1f5adc8

Browse files
committed
add docs about editable output
1 parent 4d2055d commit 1f5adc8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,23 @@ const options = {
7878
};
7979
```
8080

81+
## Advanced
82+
83+
If you need to edit the output svg for your use case, blobs also allows for _editable_ output.
84+
85+
```typescript
86+
import * as blobs from "blobs";
87+
88+
const editableSvg = blobs.editable(options);
89+
```
90+
91+
The output of this function is a data structure that represents a nested svg document. This structure can be changed and rendered to a string using its `render` function.
92+
93+
```typescript
94+
editableSvg.attributes.width = 1000;
95+
const svg = editableSvg.render();
96+
```
97+
8198
## License
8299

83100
[MIT](./LICENSE)

0 commit comments

Comments
 (0)