# Saving EditableDocument to Stream
This article shows and explains advanced techniques and approaches while working with EditableDocument at an advanced level — saving to stream with resource callback, saving resources separately from HTML markup, and saving HTML markup with adjustable resource links.
> This article shows and explains advanced techniques and approaches while working with `EditableDocument` at an advanced level — saving to stream with resource callback, saving resources separately from HTML markup, and saving HTML markup with adjustable resource links.
**Note:** The information explained in this article is applicable for GroupDocs.Editor for Node.js via Java **version 24.4** and higher.
## Introduction
In the latest versions of GroupDocs.Editor for Node.js via Java, especially in **version 24.4**, the [`EditableDocument`](https://reference.groupdocs.com/editor/nodejs-java/com.groupdocs.editor/editabledocument/) class, which is one of the most important among all types in GroupDocs.Editor, was significantly expanded and improved. These new features are focused on saving the `EditableDocument` to the HTML format into a stream using different ways and allowing you to specify a resource template string. This article covers all of them.
## Saving HTML Markup to Stream Only
Starting from **version 23.9**, the `EditableDocument` class contains a new instance method `getContent()`, which allows you to get the HTML markup of the document as a string. Its signature is:
```javascript
getContent()
```
This method internally converts the content of the `EditableDocument` instance to HTML markup, where CSS stylesheets and images are not stored inside the markup. These external resources (CSS and images) are referenced through links (URIs) by specifying their filenames. So, for example, if one HTML document has one stylesheet and two images with filenames "foo.jpeg" and "bar.png", they will be referenced in the HTML markup as:
```html
...
...
```
With this method, there is no option to specify or adjust the references to the external resources. Also, this method is useful for saving the HTML markup only, but not the external resources.
To deal with these issues, the following approach was introduced.
## Saving the Whole HTML Document to Stream with Resource Callback
Starting from **version 24.4**, a new `save()` method overload was added:
```javascript
save(htmlMarkup, saveOptions)
```
This method enables the most advanced, detailed, and adjustable saving of the `EditableDocument` instance to the HTML format.
- **`htmlMarkup`**: The first parameter is an output parameter into which the HTML markup will be written. You must specify any valid writable stream, such as `fs.createWriteStream()` or any other writable stream. It cannot be `null`.
- **`saveOptions`**: The second parameter is an instance of the new public class `HtmlSaveOptions`, which is described below. This argument also cannot be `null`.
### HtmlSaveOptions Class
The `HtmlSaveOptions` class contains four properties, only one of which is mandatory and cannot be `null`.
- **`htmlTagCase`**: Controls how the HTML tag names will be presented in HTML markup: All lower case (default value), All upper case, or First letter upper case. Its value is a special enum `TagRenderingCase`.
- **`attributeValueDelimiter`**: Controls which delimiter around the attribute values in HTML elements will be used: single quote (default value) or double quote. Its value is a special value type `QuoteType`.
- **`embedStylesheetsIntoMarkup`**: A boolean flag that controls where to store the CSS stylesheet(s): as external resources (`false`), or embed them into the HTML markup, inside the `