Skip to content

Cannot get indices for attribute changes from content in a TableCell #12

@axemonkey

Description

@axemonkey

This script is working almost exactly as I need it, but for one crucial thing.

The processText function uses getTextAttributeIndices() to work out where bold, links, italics etc start and finish in a block of text. That works perfectly on a Text element, but not on a TableCell element.

I have content editors entering content into tables for specific HTML components, which I need to parse and render. But when trying to use this method the console gives me the message:

TypeError: Cannot find function getTextAttributeIndices in object TableCell.

...because there is mo method getTextAttributeIndices for a TableCell. And if I use getText() on my table cell first, I lose the formatting and the indices vanish.

I cannot find a workaround at the moment.

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