giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.29k stars 457 forks source link

Best way to copy a webpage into CT and or improve HTML copy paste #450

Open phd21 opened 5 years ago

phd21 commented 5 years ago

Hi giuspen,

Happy New Years to you and yours,

What is the best way to copy a webpage into CherryTree CT? And or please improve HTML copy paste function.

When I "select all" and copy a webpage like a Linux Mint Forum webpage and paste that into CT, it does not keep the formatting, it does not look the same with or without word wrap. Yet, I can open LibreOffice Writer and paste into that with very good results using "paste as HTML"?

If I save the webpage as HTML and try to import that, it still does not look the same as the original webpage?

+1 It would be nice to have an option for importing PDF files

Best regards, Phil (phd21)

giuspen commented 5 years ago

Happy new year Phil, at the moment I cannot improve personally the paste from html/import from html because the most urgent task is port to the new library gtkmm3 being the current pygtk2 discontinued

kettenfett commented 5 years ago

I think you can't expect an inserted web page to look like the original. Cherrytree is not a web browser nor a MS Word-like software. However, there is still room for improvement.

phd21 commented 5 years ago

Hi giuspen,

Thanks for the reply.

Happy new year Phil, at the moment I cannot improve personally the paste from html/import from html because the most urgent task is port to the new library gtkmm3 being the current pygtk2 discontinued

I understand. So you are updating CherryTree for GTK3, that's great. Any ETA on when that will be ready? Any thoughts of a QT version where its QtWebEngine and related functions could be used or if it's even possible a mixed GTK3 and QT version?

As for the copy and pasting of HTML (web pages) accurately, I think the advantages are obvious for having the ability to copy and paste or import from HTML using a web page URL or drag-n-drop with CT that represent the web page's content accurately. I have been using CT for years and it seems to me that previous versions of CT did better with copying and pasting HTML over the newer versions, but I could be mistaken.

I can copy some web page's HTML content with accurate rendering, but entire web pages with various "frames" do not seem to show up well. Obviously, CT understands some HTML already and can be manually entered and formatted.

FYI: In LibreOffice Writer if you paste special HTML it shows up almost perfectly as the original web page. Perhaps an option to import LibreOffice (open) doc format or if linked, to display them in CT would work.

Best regards, Phil (phd21)

giuspen commented 5 years ago

The reasons for gtkmm over qt are explained in https://github.com/giuspen/cherrytree/issues/413 while it is difficult to forecast a completion date since the time I can dedicate varies a lot according mainly to my family needs

User176813679326 commented 1 year ago

hi guys how copy nd paste a website pls ?

giuspen commented 1 year ago

The import from html is limited in cherrytree. When a copy and paste directly into cherrytree gives poor results, it is worth trying to copy and paste to libreoffice instead, and then from libreoffice to cherrytree