Add either export to html or ability to copy while preserving format

It would be nice if we had some way get the contents of the file in a more formal format such as html, to make pasting it into emails or other forms of communication easier. For that I think either of these 2 options would be great:

  1. Add export option to export current page to HTML preserving the user’s custom.css settings.
  2. After selecting blocks you want to copy, when you right click, add an option to “Copy (Preserve Formatting)”.
1 Like

Very good suggestions!

I could probably implement a first pass at “Copy as HTML” so that a block like this is __mark__**down** could be copied as this is <italic>mark</italic><bold>down</bold> and could be pasted into your email / google docs.

When you say “The user’s custom.css settings are preserved” what do you mean?

2 Likes

@bensu - That would be awesome if you could add the “Copy as HTML” option!

Regarding the 2nd piece: Users can define their own CSS styles that’s stored in “logseq/custom.css” to change the look of elements in LS. So my suggestion was to retain this formatting from the user’s custom.css when the page is exported to HTML, I think it would only make sense to apply this when exporting the page to HTML tho and not for the copy option.

3 Likes

I got the basic functionality for this under “Copy as Text” by adding text/html to the cilpboard. The problem is that Copy as Text as it works today only captures one block at a time, and my use-case is about grabbing a bunch of selected blocks and copying them into an email or a document.

I’ll see if I can change Copy as Text to handle multi-block selection.

2 Likes

Maybe not the accurate answer to this feature request.
We plan to add the following features, and all of them are block-level

  • Copy as Markdown text
    copy the block and its children as markdown format text, and replace block-references, block&page-embed with related contents
  • Copy as Org-mode text
    copy as org-mode text, and replace references & embeds too
  • Copy as html
    copy as html, and replace references & embeds
2 Likes

Perfect! Thanks so much Zhiyuan!

Here is a first attempt:

We could rename this to “Copy as Markdown text” since I mean it to match the behavior outlined above.

2 Likes

exporting as html would be very useful, particularly when we have images in the files

1 Like

This feature has been implemented.
Click on the 3 dots top left → export

allows export as text, HTML, OPML

1 Like

Thanks Bad3r
is this feature in the online app or desktop?
I have Mac desktop, and I don’t see text nor html export option
What I see is
Export Graph and the following options

  • Export public pages
  • Export as standard Markdown (no block properties)
  • Export as OPML
  • Export as EDN
  • Export as JSON
  • Export as Roam JSON

Please guide me

Cheers
Bimal

Don’t click export graph, you should see an option called export page

1 Like

Thank you very much Aryan

I discovered when you send me the screen shot.
but I was getting this image
screen
I will have to recreate the scenario to see when and how I was getting that only.

Thanks
Cheers
Bimal

1 Like

Hi Aryan
I discovered it, it happens on Journal Home page

Which makes sense now

Thanks
Cheers
Bimal

1 Like