DejaVue

Поделиться
HTML-код
  • Опубликовано: 11 ноя 2024

Комментарии • 7

  • @svenvanreenen
    @svenvanreenen 3 месяца назад

    Its great content!

  • @amardeepgill3213
    @amardeepgill3213 3 месяца назад

    I'm using TipTap with NuxtUI and it's looking and feeling real nice

  • @undertale-15075O
    @undertale-15075O 3 месяца назад

    Пошли интересные темы ❤ 🇩🇪🇩🇪

  • @amardeepgill3213
    @amardeepgill3213 3 месяца назад

    I would love to know what technique Vanessa is using to persist the editor content in a database.
    TipTap exposes methods to export as JSON and HTML.
    I'm using HTML export because there are mature packages I can use to sanitize the content before persisting into the database.

    • @clelsonlopes
      @clelsonlopes 3 месяца назад +1

      I went for HTML/text format, because I need to parse the content in table cells, and editing happens for individual content when the user hits Enter. For this part then, ProseMirror can parse the content as well, from a dummy div element where its innerHTML content is the HTML/text stored. And I think you don't need to worry about sanitizing the content (if it's saved from ProseMirror beforehand) as it only allows content based on the schema you defined. Anything pasted or written in the editor will be forced to parse according to the schema.

    • @amardeepgill3213
      @amardeepgill3213 3 месяца назад +1

      @@clelsonlopes you're right about pasting content into editor being sanitized client side. but if I want to take that same html string and render it into a pdf, or use it anywhere else, I'd have to sanitize it server side before serving to the consumer