Skip to content

Conversation

@silverkszlo
Copy link
Collaborator

@silverkszlo silverkszlo commented Dec 1, 2025

📝 Summary

Add createTable() API to enable embedding markdown tables in other apps without rich text editing features. Introduces PlainTableDocument node that restricts content to tables only, and PlainTable extension that bundles required functionality (table editing, markdown serialization).

  • Add PlainTableDocument node with table-only content model
  • Add PlainTable extension (bundles Markdown, EditableTable, etc.)
  • Add PlainTableContentEditor.vue component
  • Expose window.OCA.Text.createTable() API in editor.js
  • Export PlainTable from extensions/index.js

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/extensions/PlainTable.js 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I have not tested it.

Since you are not using collaboration might be possible to write a playwright component test for this that calls createTable() for a div or so. That would make testing it easier.

@silverkszlo silverkszlo force-pushed the add-table-node branch 2 times, most recently from 9474fec to 6f131b9 Compare December 4, 2025 08:38
Add createTable() API to enable embedding markdown tables in other apps
without rich text editing features. Introduces PlainTableDocument node
that restricts content to tables only, and PlainTable extension that
bundles required functionality (table editing, markdown serialization).

- Add PlainTableDocument node with table-only content model
- Add PlainTable extension (bundles Markdown, EditableTable, etc.)
- Add PlainTableContentEditor.vue component
- Expose window.OCA.Text.createTable() API in editor.js
- Export PlainTable from extensions/index.js

Signed-off-by: silver <[email protected]>
Signed-off-by: silver <[email protected]>
Signed-off-by: silver <[email protected]>
@juliusknorr juliusknorr merged commit f8fb432 into main Dec 9, 2025
62 of 63 checks passed
@juliusknorr juliusknorr deleted the add-table-node branch December 9, 2025 08:26
@juliusknorr
Copy link
Member

/backport to stable32

@juliusknorr
Copy link
Member

/backport to stable31

@juliusknorr
Copy link
Member

/backport to stable30

@juliusknorr
Copy link
Member

/backport to stable29

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

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants