pwndoc / pwndoc

Pentest Report Generator
https://pwndoc.github.io/pwndoc
MIT License
2.29k stars 424 forks source link

Add tables directly form Pwndoc #355

Open durantthibault opened 2 years ago

durantthibault commented 2 years ago

Hello,

I would like to know if it was possible to add tables directly form pwndoc.

I am using word to finalize reports and i need to create tables from word to add some informations after the report generation. Therefore my question is to know if it would be possible to add the possibility to create tables directly from the "editor" field of pwndoc.

Please do not hesitate If you have any information that could be help me.

Thanks by advance for your help.

Thibault Durant

yeln4ts commented 2 years ago

Hello, it's not possible for now but should be added in the future

nitek29 commented 2 years ago

Salut @durantthibault,

To do this, the Pwndoc editor library needs to be updated to tiptapV2 and update the backend/src/lib/html2ooxml.js too. Currently, I have the ability to add a table from the editor but I don't know how to properly modify the html2ooxml.js file to take into account the HTML table tag.

@yeln4ts Do you know how I can add table with the html2ooxml.js ?

unmotivatedgene commented 2 years ago

@nitek29 Can you make a fork with the new table frontend and I'll try to get the backend working?

Also i'm not sure why we'd have to go to the v2 beta, looks like you can do tables in v1 https://codesandbox.io/s/fytkc?file=/src/pages/Index.vue:2064-2070

nitek29 commented 2 years ago

@unmotivatedgene Currently tables work on my backend & frontend but I use TiptapV2

RobertDoc commented 1 year ago

@nitek29 could you make a fork with those changes or a PR?

nitek29 commented 1 year ago

Sorry for the delay. After reviewing my code, I correct my previous post. The frontend has the table functionality based on TiptapV2 but the backend translates the HTML table tag into a docx bordered paragraph. I don't remember why I used the bordered paragraph instead of the table.

A fork is on my git.

Zeecka commented 1 year ago

Impressive work. This may need more test before merging. Here is 2 bugs I spotted:

image

RobertDoc commented 1 year ago

This would be amazing to get into the main branch. Thanks for posting your fork @nitek29!

nitek29 commented 1 year ago

@Zeecka My bad ! For the second point, I forgot a file. I updated my git :)

(to write under the table, you must use the bottom arrow inside the table)

nitek29 commented 1 year ago

@Zeecka thanks for your feedback. The 2 bugs are now fixed :)