Skip to content

'innerHTML' is not a valid binding error when following "contenteditable bindings" step in tutorial #3131

Closed
@rmacklin

Description

@rmacklin

When applying the solution to the "contenteditable bindings" step of the tutorial, an error is thrown:

'innerHTML' is not a valid binding

(This happens when typing the solution out as well as when you click "Show me" to have the solution automatically applied.)

Screen capture (click to view at full resolution):

sveltebindinnerhtml

Additionally, the other suggestion of binding textContent also throws an error:

'textContent' is not a valid binding

Screen Shot 2019-06-28 at 2 38 05 PM

However, text works:

Screen Shot 2019-06-28 at 2 38 38 PM

I haven't already looked into the svelte code to see whether this is supposed to work or whether the tutorial is outdated. I may have some time to dig in and answer that later, but I figured I'd open the issue since other people might already know the answer. I'd be happy to help with a PR to fix the tutorial if it is indeed a documentation issue. (I can also try to submit a PR if it's a svelte bug, but that will probably require getting a bit more familiar with the code first.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions