Open
Description
I run notion-api-js
in nodejs, but I cannot get right html content
expect html is like that
<div>music-song</div>
...
and so on
but return cotent is
[ { HTML:
'<div><h1 >Get Started</h1><p>👋 Welcome! This is a private page for you to play around with. </p><br /><p>Give these things a try:</p><br /><br /><p style="color:undefined">Have a question?</p></div>',
Attributes:
{ title: 'Get Started',
slug: 'get-started',
cover: null,
teaser:
'Get Started 👋 Welcome! This is a private page for you to play around with. Give these things a try: Have a question?',
icon: null,
id: '9bdfefb9-56af-4a3c-b21e-4301a99f6994' } },
so the return html content is total wrong? and I also use Token
, why cannot get right html content?
my code is
// require syntax
const Notion = require("notion-api-js").default;
const pageUrl = "https://www.notion.so/2628769120ad41d998ec068d6e2eb410?v=e8e69ac68a8d483792c54541e4d8ba72"
const token = "acf60ab1255a12c6c101e5beb6b776a767c25a2339ea86f0d5ac5a9abc25cbb7c1e27f439adbd9cdae1bb717f02ccf739dc694c42c86018f7b136b81ce2bbcdda4f1abd6672489231d2f3835c16c"
const notion = new Notion({
token ,
options: {
pageUrl
}
});
notion.getAllHTML().then(html => {
// Your Code here
console.log(html)
});