Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sections returned from book.spine.get contain incorrect html in React #1282

Open
jmcelfresh opened this issue Jul 13, 2022 · 1 comment
Open

Comments

@jmcelfresh
Copy link

I'm trying to get a version of the renderless example working in my React app.

const section = book.spine.get(href)

section.render().then(html => {
    console.log('rendered html', html)
})

When I run this code the rendered html returned is the contents of the index.html document used by my React app, not the chapter requested. It returns this same html no matter which spine item I request. The other section values are correct, representing information about the section at the requested href, with the notable exception of section.output which also contains index.html values, not the chapter html.

If I used book.renderTo to create a rendition then call redition.display(href) I get the correct html in an iframe as expected.

@johnfactotum
Copy link
Contributor

See #1397 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants