Skip to content

Outputting invalid cell JSON #1

@trickidicki

Description

@trickidicki

Input HTML:

<h1 id="welcometoatest">Welcome to a test!</h1>
<p>Including normal text and <a href="www.celljs.org">hyperlinks</a>.</p>

Generates JSON:

[
  {
    "$type": "h1",
    "$cell": true,
    "id": "welcometoatest",
    "$text": "Welcome to a test!"
  },
  {
    "$type": "#text",
    "$cell": true
  },
  {
    "$type": "p",
    "$cell": true,
    "$components": [
      {
        "$type": "text",
        "$text": "Including normal text and "
      },
      {
        "$type": "a",
        "href": "www.celljs.org",
        "$text": "hyperlinks"
      },
      {
        "$type": "text",
        "$text": "."
      }
    ]
  }
]

The part

  {
    "$type": "#text",
    "$cell": true
  },

isn't valid for Cell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions