Cut-and-paste Folded View


#1

After I’ve folded up the document using filters on various tags, it looks awesome!

I’d like to then cut-and-paste this folded down version of my outline. But, when I use the regular cut-and-paste, it grabs all the text that is hidden in the folds.

I see that the Print option under File outputs the folded view. If the same could be cut-and-pasted, that would be awesome.

(I also requested a feature to Hide Tags… this cut-and-paste feature along with an option to Hide Tags would be a fast way to port over just the part of the document that I want to use in a different application, say an email or a more clunky heavy word processing utility).


#2

I think this script will do what you want:


#3

And you can modify that script to not include tags (trailing tags anyway) by changing this line:

results.push(each.line());

to:

results.push(each.text());

#4

Thanks! The version with

each.line()

worked well.

But, if I try it with just

each.text()

I do lose the tags (which is good), but I also lose all the markup and modeContext. I lose the #, bullets and square checkboxes.

Is there a way to “push” all the properties of a line except the tags?


#5

I think I figured it out with a little javascript… I used the following:

				var theLine = each.line();
				theLine = theLine.split('@')[0];
				results.push(theLine)

in place of

results.push(each.line());

This seemed to do the trick with the file that I tested. Many thanks for your pointers!