Giter Club home page Giter Club logo

rich-text's Introduction

Caisy Rich Text Monorepo

Under packages you find all the public packages for rich text rendering.

This repo uses the starter from turborepo.

rich-text's People

Contributors

moritzgruber avatar hassanmostafaa avatar nicolasshiken avatar aghazy94 avatar

Stargazers

Sergii Kirianov avatar

Watchers

 avatar

Forkers

teleporthq

rich-text's Issues

Request: Add `<img>` tag support to `rich-text-html-parser` using Caisy's Assets

Hello,

Would it be possible to add support for <img> tags inside rich-text-html-parser for linked documents, which are Caisy assets? This would probably require passing connections with the rich text JSON, and generating the <img> tag with the help of connections like in other libraries:

{
    connections &&
        connections.map((component: any) => {
            if (component?.__typename === "Asset" && node?.attrs?.documentId === component.id) {
                return <Asset {...component} />;
            }
            return null;
        })
}

Motivation is that this library can be used (as I'm using it) to render HTML content for RSS feeds with frameworks that dont support rendering components to HTML like Astro (see here). Of course there are workarounds (for Astro), like using React for such things, but this for me looks like overkill, just to get the HTML for RSS feed.

Currently the library has an extension for document link, which adds a tag of <connection data-document-id="{GUID}"></connection> to the outputted HTML. This currently cannot be altered in a meaningful way from my perspective, apart from modifying the HTML itself - that is creating a DOM/tree from the HTML and modifying it.

One alternative could also be to expose something to overwrite the document link tags like in other provided rich text libraries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.