Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Beta]: Export as Word writes html-to-docx into the file's author, last-modified-by and keywords fields

Aperta
#5,289 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Read packages/platejs/src/docx/export/lib/internal/constants.ts and packages/platejs/src/docx/export/lib/internal/docx-document.ts, then trace the internal HTML-to-DOCX export call in packages/platejs/src/docx/export/lib/. Check whether exportDocx allows applications to set these metadata fields and how the defaults reach docProps/core.xml; done means exported files no longer name html-to-docx as creator, last editor, or keyword.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug plugin:docx target:beta

Testing lane

  • Repository: udecode/plate
  • Branch: next
  • Release channel: Beta
  • Exact commit/package version: NOT_ENOUGH_INFO

Summary

Export as Word on /docs/examples/export writes html-to-docx into the Word file's dc:creator, cp:lastModifiedBy and cp:keywords in docProps/core.xml. Office apps read these fields as the document's author, last editor and keywords, so every exported file names the converter library as its author. The file was not opened in Word for this issue. The released site, platejs.org, writes the same values, so this is not new in Beta.

Reproduction

Repro 1: /docs/examples/export, Chromium

An agent found this on 2026-10-21 (PT) in the Claude desktop app's built-in Chromium, at natamox's request.

  1. Open https://beta.platejs.org/docs/examples/export.
  2. Click Export, then Export as Word. The demo saves document.docx.
  3. Open document.docx as a zip file and read docProps/core.xml.

docProps/core.xml holds <dc:creator>html-to-docx</dc:creator>, <cp:lastModifiedBy>html-to-docx</cp:lastModifiedBy> and <cp:keywords>html-to-docx</cp:keywords>.

The Word files that an agent saved from desktop Chrome on the same day, one from Beta and one from https://platejs.org/docs/examples/export, hold the same three values. An agent read them again on 2026-10-24 for this issue.

Expected

The exported file does not name the converter library as its author, last editor or keyword. It leaves these fields empty, or lets the app set them. This is the agent's expectation from its notes; no docs page covers these fields.

Actual

All three fields read html-to-docx.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO. The page does not show its build.
  • First run: an agent in the Claude desktop app's built-in Chromium 152.0.7977.167, desktop viewport 1024×768, on 2026-10-21 (PT). The second pair of files came from desktop Chrome driven by an agent the same day.
  • On 2026-10-23 (PT) an agent on natamox's Xiaomi 14 (Android 16, Chrome 154) exported Word files from this page through Chrome's real download. Their metadata was not checked.
  • Not replayed on the live Beta after 2026-10-21. The code below reads the same on next fc9ebcd16b.

Caveat

From a reading of the code on next fc9ebcd16b, not checked with a debugger:

  • packages/platejs/src/docx/export/lib/internal/constants.ts:96 sets applicationName = 'html-to-docx', and the default document options use it for creator, keywords and lastModifiedBy (:125, :135, :136).
  • packages/platejs/src/docx/export/lib/internal/docx-document.ts:531-534 falls back to it whenever these options are missing.
  • The export path hands the converter only font, margins, orientation, pageSize and title, so the fallbacks apply. That call is at lines 50-56 of the internal HTML-to-DOCX export file in packages/platejs/src/docx/export/lib/. Whether exportDocx lets an app set these fields was not checked.

Evidence

  • No recording. The values above were read from the saved files.

Related

  • None.
Lingua principale
TypeScript
Stelle
16.6k
Fork
993
Merge medio
20h 1m
PR unite (30g)
60

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di udecode/plate

Tutte le issue di udecode/plate

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.