Re: Support for formatted text
Thanks Terry! On Fri, Jan 30, 2015 at 10:03 AM, wrote: > Is it possible to have Leo analyse what type of text is being pasted and > thus > define automatically the type of node (rich/plain)? > It looks possible, `win32clipboard.EnumClipboardFormat`, "enumerate the data formats that are currently available on the clipboard. " -- http://docs.activestate.com/activepython/2.4/pywin32/win32clipboard.html. I'm sure Linux & Mac have the same. No idea how much work to accommodate all (or any) of them. Matt -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Friday, January 30, 2015 at 3:05:59 PM UTC, Terry Brown wrote: > When you copy the rendered HTML in the browser and paste into Leo you > get WYSIWYG reproduction pasting into a richtext node That is what I was looking for. So it is already supported in Leo. Great! > and just plain text posting into a regular node - somewhere in the > pipeline the > content actually delivered is selected based on the capabilities of the > receiving end of the pipeline Is it possible to have Leo analyse what type of text is being pasted and thus define automatically the type of node (rich/plain)? > not sure of the details, but remember > clipboards can paste images and other things that aren't plain text. > This is another crucial point. What about images. Is there a way of embedding them into a richtext node, along with the text? (if I am not mistaken, the right term is 'inline') -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Fri, Jan 30, 2015 at 9:05 AM, 'Terry Brown' via leo-editor < leo-editor@googlegroups.com> wrote: > On Fri, 30 Jan 2015 05:17:48 -0600 > "Edward K. Ream" wrote: > > I don't think you need to view source or copy text that looks like HTML. > Hah. I didn't know that. The following *does* work: - Create an @rich node with the richtext plugin enabled. - Make sure the node is active by moving away from the node and then moving back. You should see two lines of icons at the top of the body text. - As Terry says, select-all (ctrl-a) copy (ctrl-c) on the *rendered* browser content. - Paste into the body pane of the @rich node. You will see the original web pane in Leo, more or less. For example, when copying Leo's home page you will see the pictures on the page. Actually I think modern clipboard operations are based on magic ;-) > When you copy the rendered HTML in the browser and paste into Leo you > get WYSIWYG reproduction pasting into a richtext node and just plain > text posting into a regular node - somewhere in the pipeline the > content actually delivered is selected based on the capabilities of the > receiving end of the pipeline - not sure of the details, but remember > clipboards can paste images and other things that aren't plain text. > Thanks for the clarification. I was confused because a plain text editor, like scite, will show only the bare text of the web page, just as Leo shows when you paste into the body text of a "plain" (non @rich) node. So, I learned something new about both the richtext plugin and cut/paste from browsers. Thanks Terry. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Fri, 30 Jan 2015 05:17:48 -0600 "Edward K. Ream" wrote: > On Wed, Jan 28, 2015 at 3:39 PM, wrote: > > >> Does the solution that you suggest require raw HTML code? > >> > >> Yes. I just did an experiment, and you must cut/paste real html. > > > > That's very cumbersome. > > Sorry, but the html contains essential information that is not > present when you simply copy and paste text from the browser. I don't think you need to view source or copy text that looks like HTML. For me, the most effective way to reproduce a web page from a browser in a Leo richtext node is to select-all (ctrl-a) copy (ctrl-c) on the *rendered* browser content, i.e. the web page as you usually look at it. That gave better results, fidelity of reproduction wise, than viewing the source and copying that. Partly because the source includes the outer elements that the richtext editor probably doesn't want to see, remember the richtext editor is itself a complete HTML page with its own HTML and HEAD elements. > There is no way that Leo, or any other program, can magically recover > the missing data. Actually I think modern clipboard operations are based on magic ;-) When you copy the rendered HTML in the browser and paste into Leo you get WYSIWYG reproduction pasting into a richtext node and just plain text posting into a regular node - somewhere in the pipeline the content actually delivered is selected based on the capabilities of the receiving end of the pipeline - not sure of the details, but remember clipboards can paste images and other things that aren't plain text. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Fri, Jan 30, 2015 at 11:17 AM, Edward K. Ream wrote: > On Wed, Jan 28, 2015 at 3:39 PM, wrote: > > > >>> Does the solution that you suggest require raw HTML code? >>> >>> Yes. I just did an experiment, and you must cut/paste real html. >>> >> >> That's very cumbersome. >> > > Sorry, but the html contains essential information that is not present > when you simply copy and paste text from the browser. There is no way that > Leo, or any other program, can magically recover the missing data. > Well, perhaps not all of the HTML code will be preserved when you copy something from a webpage by simple selection, like you say, but this is no problem at all. What is needed is preserving at least the basic formatting, like font size and possibly color. By the way, I tried copying and pasting from a webpage into a Gtk-based environment (the Cherrytree PIM), and a lot of the copied content is preserved. Even tables! Now, why can't Leo do that? > Happily, "casual" users don't have html debugging tools installed, so they > can get the full html by using the "show source" menu item in the browser. > This shouldn't be too odious. > I know that, and it was precisely Ctrl+U (show source) that I had in mind when I mentioned reading the source. But come on, do you mean to tell me that if I wanted to copy some text from a webpage, I should view the source, find the relevant part in the HTML code, and copy it to the clipboard?!? Even if it is not technically difficult, it is very cumbersome. Too much for anyone, I believe, especially if you have to deal with a lot of texts. Some PIM programs even offer a send-to option integrated right into the system shell, or into the browser's right-click menu, so that a selected text can be directly sent to the program and stored there, without any fuss at all. And Leo does not even provide decent support for HTML text pasted manually from the clipboard?!? If Leo is to be taken seriously as a PIM tool (and as I understand it, being a PIM tool is one of its main purposes), it really needs a better support of the formatted text. Sure, Leo started as a programming tool, supporting only plain text, but we are no longer living in a plain-text era. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Wed, Jan 28, 2015 at 3:39 PM, wrote: > >> Does the solution that you suggest require raw HTML code? >> >> Yes. I just did an experiment, and you must cut/paste real html. >> > > That's very cumbersome. > Sorry, but the html contains essential information that is not present when you simply copy and paste text from the browser. There is no way that Leo, or any other program, can magically recover the missing data. Happily, "casual" users don't have html debugging tools installed, so they can get the full html by using the "show source" menu item in the browser. This shouldn't be too odious. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Wednesday, January 28, 2015 at 5:37:13 PM UTC, Edward K. Ream wrote: > > > > On Wed, Jan 28, 2015 at 10:24 AM, > wrote: > > > > Does the solution that you suggest require raw HTML code? > > Yes. I just did an experiment, and you must cut/paste real html. > That's very cumbersome. For most users, it defeats the purpose. The casual user wants to be able to simply copy and paste a text from a webpage to a Leo's node. When copying data from a webpage, nobody goes to the source first and selects the text from the source (also because you would have to find the relevant paragraph within the source, which sometimes is like finding a needle in a haystack). In short, having to deal with HTML code is very, very cumbersome. What would it take for Leo to accept a text selection directly from a webpage (as in simple "copy and paste")? This feature is essential if you want Leo to become popular as a data storage system. > > > Do the richedit and the viewrendered plugins mentioned by you allow me to > edit the imported webpage in a WYSIWYG environment? This point is crucial. > > Yes, you can do that, as an experiment has just verified. > Which of the two plugins (richtext or viewrendered) supports the WYSIWYG environment through which you can edit the imported text? (again, without bothering for the source code) -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Wed, Jan 28, 2015 at 10:24 AM, wrote: > Does the solution that you suggest require raw HTML code? Yes. I just did an experiment, and you must cut/paste real html. > Do the richedit and the viewrendered plugins mentioned by you allow me to edit the imported webpage in a WYSIWYG environment? This point is crucial. Yes, you can do that, as an experiment has just verified. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
Thank you, Edward and Terry. Does the solution that you suggest require raw HTML code? Is what I select, copy and paste HTML code (as such) or is it the webpage itself as it appears in the browser? I am asking because if I have to work with HTML code, it's too much fuss. Do the richedit and the viewrendered plugins mentioned by you allow me to edit the imported webpage in a WYSIWYG environment? This point is crucial. Thanks again, Sergei -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Wed, 28 Jan 2015 08:26:27 -0600 "Edward K. Ream" wrote: > On Mon, Jan 26, 2015 at 9:17 PM, sergei karhof > wrote: > > > If I paste formatted text copied from a webpage into a node, will > > the formatting be preserved? I just this moment pasted an order confirmation webpage into a Leo node. I created a new node and changed its name to '@rich', the '@rich' can appear anywhere in the headline, or, I think, the body. There is a toggle command I could have used, but I just changed the headline and moved out of and back into the node to make it change to HTML editing mode. Then I pasted the webpage (select all / copy in the browser), and now whenever I enter that node I see the web page as it appeared in the browser. This requires the richtext.py plugin, as Edward said. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Support for formatted text
On Mon, Jan 26, 2015 at 9:17 PM, sergei karhof wrote: > If I paste formatted text copied from a webpage into a node, will the > formatting be preserved? > Not usually, but it may be possible using the richtext plugin. Also, if you can get the actual html from the web page, you should be able to view the html using the viewrendered plugin. Just paste the text into the body text of any node, then do Alt-0, vr-toggle, to show the viewrendered pane. > > Is WYSIWYG supported in this case? > The richtext plugin supports wysiwyg. > Can I later modify the contents of the formatted text from the WYSIWYG > environment? (without having to edit HTML tags manually) > I think the answer is yes. With the richtext plugin. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Support for formatted text
If I paste formatted text copied from a webpage into a node, will the formatting be preserved? Is WYSIWYG supported in this case? Can I later modify the contents of the formatted text from the WYSIWYG environment? (without having to edit HTML tags manually) Thank you. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.