How to paste text to a bullet list?

Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

How to paste text to a bullet list?

Postby Thomas Lohrum » Mon Aug 04, 2014 2:56 pm

Often i want to paste some text to an existing bullet list.

Example:

  • aaaaaaaa
    bbbbbbb
    ccccccc
  • <--- paste text here
  • dddddddd
    eeeeeee
    fffffffffff

Text to paste:

Line 1
Line 2
Line 3

Each line is separated by CR + LF.

After pasting i want my text like this:

  • aaaaaaaa
    bbbbbbb
    ccccccc
  • Line 1
    Line 2
    Line 3
  • dddddddd
    eeeeeee
    fffffffffff


But what i get is this:

  • aaaaaaaa
    bbbbbbb
    ccccccc
  • Line 1
  • Line 2
  • Line 3
  • dddddddd
    eeeeeee
    fffffffffff

Please be aware this is reproducible only, when inserting text that has been copied by a different editor. When you copy the text from inside CN it will paste the text without bullets at all.

Does anyone have an idea how to achieve this easily?

Does it actually require a new feature, such as converting text to paragraph?

Thanks.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5002
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to paste text to a bullet list?

Postby CintaNotes Developer » Thu Aug 07, 2014 5:17 am

Hi Thomas,

I guess this is why you've added this request to the roadmap?

Short answer is yes, it requires a new feature, because it requires replacing CR+LFs with vertical tabs which are used to separate sub-paragraphs within one list item.

However, the fastest way to do it would be to use a tool such as AutoHotKey. I guess it should be possible to assign a hot key to an action "take text from clipboard, replace CR+LFs with \v, put back to clipboard, paste".
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Thu Aug 07, 2014 11:19 am

Hi Alex,

CintaNotes Developer wrote:Hi Thomas, I guess this is why you've added this request to the roadmap?

Yes.

CintaNotes Developer wrote:However, the fastest way to do it would be to use a tool such as AutoHotKey. I guess it should be possible to assign a hot key to an action "take text from clipboard, replace CR+LFs with \v, put back to clipboard, paste".

I don't want to install extra software. I coded an application which gets the clipboard content, replaces CRLFs and copies back to the clipboard in one step. Created a link to the exe within the Start Menu folder and assigned a global shortcut to it. It's a workaround.... waiting for the feature to be implemented natively inside CintaNotes. :) CintaNotes does things other applications don't support, that is why i like to use CintaNotes very much.

Thomas
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Fri Aug 08, 2014 8:54 am

Alex,

after using my workaround for a day i better understand the issue. While creating a paragraph composed by a number of lines is one requirement, i also have the need to append more lines to an existing paragraph. I realized that pasting is actually all it takes.

Rules:

  • In case the caret is positioned inside a paragraph, which is only possible in bullet lists, add the content from the clipboard as a paragraph. In that case Cr+Lf must be replaced by vertical tabs.
  • In case the caret is positioned outside a paragraph, paste the text as is. This is the current design.

After all it does not require a new function. Actually this is a natural extension. When pasting text to a paragraph, add it as a paragraph. The change does not affect the current design of creating bullet lists. Thus it should be rather easy to implement.

I checked with MS Word. It does create separate bullet lists, regardless whether a bullet already exists or not. Imo, my suggestion is smarter, because it does handle both cases. To create a bullet list for each line, first paste the text, select it, then create the list. To append as a paragraph, first create the list, then paste the text.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5002
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to paste text to a bullet list?

Postby CintaNotes Developer » Fri Aug 08, 2014 12:46 pm

Thanks for the clarifications! However, the rules that you specified are not 100% clear to me, namely:

In case the caret is positioned inside a paragraph, which is only possible in bullet lists


Why is that? It is very possible that the caret is positioned inside of a paragraph which doesn't have the "bullet list item" style. Also, vertical tabs are possible not only in lists.

Maybe you really meant "when pasting text containing CRLFs into a paragraph which is part of a bullet list"?
In this case, what do we do with the "tail" of the text (suppose we paste somewhere in the middle of the list item).
And what to do when I do want individual lines of pasted text to become separate list items (example: grocery list)?
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Fri Aug 08, 2014 12:49 pm

CintaNotes Developer wrote:Maybe you really meant "when pasting text containing CRLFs into a paragraph which is part of a bullet list"?

Yes!

Thanks for your clarification, too.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5002
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to paste text to a bullet list?

Postby CintaNotes Developer » Fri Aug 08, 2014 2:30 pm

Great, what about my questions then?

In this case, what do we do with the "tail" of the text (suppose we paste somewhere in the middle of the list item)?
And what to do when I do want individual lines of pasted text to become separate list items (example: grocery list)?
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Fri Aug 08, 2014 3:08 pm

Not sure i understand, but i think nothing should happen with the tail. It remains part of the paragraph.

Hm, that actually makes sense ;)

Turn off bullet list, paste, select text and create the bullet list.

No, this is too backwards. By default CN should work the same as Word and Wordpad. It's the new function that should require some extra action on your side. Perhaps a separate shortcut like Ctrl+Shift+V?
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Mon Aug 11, 2014 9:41 am

Thomas Lohrum wrote:Not sure i understand, but i think nothing should happen with the tail. It remains part of the paragraph.
CintaNotes Developer wrote:Hm, that actually makes sense ;)

Alex,

something is broken with the thread. Obviously your answer got mixed with mine. Nevertheless, to answer your last question:

Thomas Lohrum wrote:Turn off bullet list, paste, select text and create the bullet list.
CintaNotes Developer wrote:No, this is too backwards. By default CN should work the same as Word and Wordpad. It's the new function that should require some extra action on your side. Perhaps a separate shortcut like Ctrl+Shift+V?

Just because MS Software is standard does not imply, it is any useful ;) If Word would do the job better, i might as well store my notes there. ;) It is CintaNotes which supports unique features and demonstrates software can do better. :) Rather than introducing a new shortcut, it might be more interesting to add an ini-setting. Something like "Editor.PasteAsParagraph=0|1". I'd turn it on as default, because i think it better meets user expectation.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5002
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to paste text to a bullet list?

Postby CintaNotes Developer » Tue Aug 12, 2014 7:16 am

Thomas Lohrum wrote:something is broken with the thread. Obviously your answer got mixed with mine.

That's my fault, sorry. By mistake I pressed "Edit" instead of "Reply". But I think it should be no problem to still follow the discussion.

Thomas Lohrum wrote:Just because MS Software is standard does not imply, it is any useful ;) If Word would do the job better, i might as well store my notes there. ;) It is CintaNotes which supports unique features and demonstrates software can do better. :) Rather than introducing a new shortcut, it might be more interesting to add an ini-setting. Something like "Editor.PasteAsParagraph=0|1". I'd turn it on as default, because i think it better meets user expectation.

Ok, let's have this setting, it's no problem. But by default CN should follow established standards and principle of least surprise. Especially because CN is not a word processor and text editing is not intended to be its competitive advantage.
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Tue Aug 12, 2014 8:27 am

CintaNotes Developer wrote:Ok, let's have this setting, it's no problem. But by default CN should follow established standards and principle of least surprise.

Ok, thanks Alex.

CintaNotes Developer wrote:Especially because CN is not a word processor and text editing is not intended to be its competitive advantage.

Maybe it is not intended, but writing with CN is really productive. Using sections as chapters and manual sorting to organize notes order, it can even be used to write handbooks. With its HTML export CN offers (limited) CMS capabilities. There is so much you can do with CN, besides taking notes. Even use it as a lightweight project management system, by using tags efficiently. CN is an allrounder and editing is smooth. Ever tried to organize and edit text in MS Word using bullet lists? It's a pain, whereas CN is a joy. :D

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5002
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to paste text to a bullet list?

Postby CintaNotes Developer » Tue Aug 12, 2014 9:17 am

Thomas Lohrum wrote:Ok, thanks Alex.

Final wording of the task:

Code: Select all

Add option "editor.lists.paste.alwaysintoitem" with default value of zero.
1. On pasting, if caret is inside of a list item, and "editor.lists.paste.alwaysintoitem" is 1, convert CRLFs into vertical tabs.
2. Add context menu item "Paste Into List Item Ctrl+Shift+V", placed after "Paste",
and visible only when caret is inside of a list. It should do the convertion of CRLFs to vertical tabs regardless of the aforemetioned setting.


Maybe it is not intended, but writing with CN is really productive. Using sections as chapters and manual sorting to organize notes order, it can even be used to write handbooks. With its HTML export CN offers (limited) CMS capabilities. There is so much you can do with CN, besides taking notes. Even use it as a lightweight project management system, by using tags efficiently. CN is an allrounder and editing is smooth. Ever tried to organize and edit text in MS Word using bullet lists? It's a pain, whereas CN is a joy. :D

That's all well and good, really :) But most of all we need something what we can use as our competitive advantage for marketing purposes. Being a nice all-rounder and thus pleasing everyone is a road to nowhere, unfortunately.
Alex
Thomas Lohrum
Posts: 1324
Joined: Tue Mar 08, 2011 11:15 am

Re: How to paste text to a bullet list?

Postby Thomas Lohrum » Tue Aug 12, 2014 9:45 am

CintaNotes Developer wrote:Final wording of the task:
Add option "editor.lists.paste.alwaysintoitem" with default value of zero.
1. On pasting, if caret is inside of a list item, and "editor.lists.paste.alwaysintoitem" is 1, convert CRLFs into vertical tabs.
2. Add context menu item "Paste Into List Item Ctrl+Shift+V", placed after "Paste",
and visible only when caret is inside of a list. It should do the convertion of CRLFs to vertical tabs regardless of the aforemetioned setting.

In general this is fine. Please be aware though, there already exists special pasting functionality with other applications. Chrome uses Ctrl+Shift+V to paste plain text (it removes formatting of the text). Word and Outlook support Ctrl+Alt+V to paste special, also including an option to remove formatting.

Thomas
User avatar
CintaNotes Developer
Site Admin
Posts: 5002
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to paste text to a bullet list?

Postby CintaNotes Developer » Wed Aug 13, 2014 7:08 am

Thomas Lohrum wrote:In general this is fine. Please be aware though, there already exists special pasting functionality with other applications. Chrome uses Ctrl+Shift+V to paste plain text (it removes formatting of the text). Word and Outlook support Ctrl+Alt+V to paste special, also including an option to remove formatting.


Yes, I'm aware of these pasting options, thanks. Probably in the future we'll implement "Paste special" as well. But for now let's settle with the current task definition.
Alex

Return to “CintaNotes Personal Notes Manager”