Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Export to markdown and HTML #300

Closed
AntoLC opened this issue Oct 2, 2024 · 3 comments · Fixed by #318
Closed

✨Export to markdown and HTML #300

AntoLC opened this issue Oct 2, 2024 · 3 comments · Fixed by #318
Assignees
Labels
enhancement New feature or request feature frontend good first issue Good for newcomers

Comments

@AntoLC
Copy link
Collaborator

AntoLC commented Oct 2, 2024

Feature Proposal

We can easily export the document to markdown or html.

We could add 2 buttons, "Copy to markdown" and "Copy to html" that will copy the editor in your clipboard to paste it where you want.

See: https://www.blocknotejs.org/docs/editor-api/converting-blocks

image

Dropdown code location

https://github.com/numerique-gouv/impress/blob/39d0211593511dd1030264f9a7e37e57cab1bce8/src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBox.tsx#L67-L130

@AntoLC AntoLC added enhancement New feature or request frontend feature labels Oct 2, 2024
@virgile-dev virgile-dev added the good first issue Good for newcomers label Oct 9, 2024
@rvveber
Copy link
Collaborator

rvveber commented Oct 10, 2024

I would like to implement this.
Can it be assigned to me?

@rvveber
Copy link
Collaborator

rvveber commented Oct 10, 2024

The feature was implemented
Tests are on the way

rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
Added buttons to the Document Toolbox to copy the content of the currently open editor to the clipboard, either as HTML or as Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
Added buttons to the Document Toolbox to copy the content of the currently open editor to the clipboard, either as HTML or as Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
Added buttons to the Document Toolbox to copy the content of the currently open editor to the clipboard, either as HTML or as Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
Added buttons to the Document Toolbox to copy the content of the currently open editor to the clipboard, either as HTML or as Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
It checks the copy as Markdown button. It checks the copy as HTML button. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
Added buttons to the Document Toolbox to copy the content of the currently open editor to the clipboard, either as HTML or as Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
It checks the copy as Markdown button. It checks the copy as HTML button. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
Add buttons to copy editor content as HTML or Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 15, 2024
@rvveber
Copy link
Collaborator

rvveber commented Oct 15, 2024

Finally was able to run the tests locally. They were not compatible with my operating system.
For future tickets, i now have a working way of writing tests and know what conventions are in place.

You may review.
Thanks!

rvveber added a commit to rvveber/impress that referenced this issue Oct 16, 2024
Add buttons to copy editor content as HTML or Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 16, 2024
Add buttons to copy editor content as HTML or Markdown. Closes suitenumerique#300
rvveber added a commit to rvveber/impress that referenced this issue Oct 16, 2024
Add buttons to copy editor content as HTML or Markdown. Closes suitenumerique#300
AntoLC pushed a commit that referenced this issue Oct 16, 2024
Add buttons to copy editor content as HTML or Markdown. Closes #300
lindenb1 pushed a commit to lindenb1/impress that referenced this issue Oct 17, 2024
# This is the 1st commit message:

🚨(docker) fix docker warning about casing

When we build the docker image, we get a warning
about the casing in the Dockerfile. This commit
fixes the casing in the Dockerfile.

# This is the commit message suitenumerique#2:

🐛(docker) update docker-compose.yml to make nginx depend on app-dev

Modified docker-compose.yml to ensure nginx starts only after app-dev.

Signed-off-by: lindenb1 <linden@b1-systems.de>

# This is the commit message suitenumerique#3:

♻️(email) use full name instead of email

If the full name is available,
we will use it to identify the user in the email
instead of the email address.

# This is the commit message suitenumerique#4:

⬆️(dependencies) update python dependencies
# This is the commit message suitenumerique#5:

✨(frontend) added copy-as buttons for HTML and Markdown

Add buttons to copy editor content as HTML or Markdown. Closes suitenumerique#300

🐛(backend) fix dysfunctional permissions on document create

When creating a document access, users were benefitting on the targeted
document from the highest access right they have among all documents.
This is because we forgot to filter on the document ID when retrieving
the role of the user. We improved all tests to secure this issue.

🚚(backend) split test file for api template accesses

The number of lines in this file had exceeded 1000 lines.

➖(backend) move freezegun to dev dependencies

Freezegun is for testing and should not be installed in the
production image.

✨(backend) allow uploading more types of attachments

We want to allow users to upload files to a document, not just images.
We try to enforce coherence between the file extension and the real
mime type of its content. If a file is deemed unsafe, it is still accepted
during upload and the information is stored as metadata on the object
for display to readers.

✨(backend) create ai endpoint

We created 2 new action endpoints on the document
to perform AI operations:
- POST /api/v1.0/documents/{uuid}/ai-transform
- POST /api/v1.0/documents/{uuid}/ai-translate

🎨(frontend) reduce prop drilling thanks to doc store

We start to have a deep prop drilling with doc,
time to use the doc store to reduce that.
We still prefer to pass the doc as a prop to
keep our component as "pure" as possible, but if
the drilling is too deep, better
to use the doc store.

✨(frontend) add ai blocknote feature

Add AI button to the editor toolbar.
We can use AI to generate content with our editor.
A list of predefined actions are available to use.

🔧(helm) add ai setting to environments

Add the ai setting to the environments.

🐛(frontend) fix flaky e2e test

A test on e2e was flaky, this commit fixes it.

Update CHANGELOG.md with hyphens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature frontend good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants