Skip to content

Commit

Permalink
Document DOM node input
Browse files Browse the repository at this point in the history
  • Loading branch information
domchristie committed Apr 29, 2018
1 parent e370a75 commit 128381f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ var turndownService = new TurndownService()
var markdown = turndownService.turndown('<h1>Hello world!</h1>')
```

Turndown also accepts DOM nodes as input (either element nodes, document nodes, or document fragment nodes):

```js
var markdown = turndownService.turndown(document.getElementById('content'))
```

## Options

Options can be passed in to the constructor on instantiation.
Expand Down

0 comments on commit 128381f

Please sign in to comment.