Skip to content

Add .rtf (Rich Text Format) read+write support #83

Description

@Mearman

Add read+write support for .rtf, Microsoft's Rich Text Format. RTF is the cleanest pivot fit of any format documents.js doesn't yet support: it's structurally wordprocessing (paragraphs, runs, character properties, paragraph properties, tables, lists, images all have direct ContentDocument equivalents), and it can express more of the wordprocessing variant than markdown can (colour, font family/size, alignment) — no document-schema.js model changes needed.

The codec itself is a real, multi-week hand-written undertaking: RTF is tokenised plain text, not XML, so none of the existing XML-parser plumbing (ooxml.js, odf.js) is reusable. It needs its own destination/group state machine, \uN/\ucN unicode handling with codepage fallback, and parsers for five header mini-formats (fonttbl/colortbl/stylesheet/listtable/listoverridetable).

Previously closed as not-planned for niche demand under the hand-write-no-third-party-library stance; reopened as full support is now wanted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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