Files
boris/node_modules/applesauce-content
Gigi c1e0e82704 feat: integrate applesauce-content for proper content parsing and rendering
- Install applesauce-content package for content parsing
- Use getParsedContent() to parse nostr content according to applesauce patterns
- Create proper TypeScript interfaces for ParsedNode and ParsedContent
- Add renderParsedContent() component to render parsed content with proper styling
- Handle mentions, links, and text content with appropriate styling
- Add CSS styles for nostr-mention and nostr-link classes
- Follow applesauce-content documentation patterns for content rendering
- Maintain type safety with proper interfaces instead of 'any' types

This follows the applesauce-content documentation exactly as shown
in the examples, providing proper content parsing and rendering.
2025-10-02 08:33:00 +02:00
..

applesauce-content

applesauce package for parsing text note content

Example

import { getParsedContent } from "applesauce-content/text";

const stringContent = `
hello nostr!
nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6
`;
const ats = getParsedContent(stringContent);

console.log(ats);
/*
{
  type: 'root',
  event: undefined,
  children: [
    { type: 'text', value: 'hello nostr!' },
    { type: 'text', value: '\n' },
    {
      type: 'mention',
      decoded: [Object],
      encoded: 'npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6'
    }
  ]
}
*/