Feature Request: Export full text of transclusion

Hi,

I’d like to request a menu item allowing export of a transclusion notes’ text contents (i.e. what is shown in preview) as plain text.

A ‘select all’ button and then copying would also do it, but ‘select all’ does not seem to be available. Selecting and scrolling down is not practical for long notes.

Appreciate any input and your consideration of perhaps adding this in future releases.

No promises but the request is noted.

Thank you @BLUEFROG

Here’s a little teaching edition script that may be useful…

tell application id "DNtp"
	if exists (content record) then -- A document must be selected and displayed in the view/edit pane or a document window
		set currentRecord to content record -- If it exists, use it
		if (type of currentRecord = markdown) then -- Check if it's a Markdown file
			set plainText to (plain text of currentRecord)
			if (plainText contains "{{") or (plainText contains "![[") then -- Does the file appear to have transcluded data
				set renderedContent to (rich text of currentRecord) -- Get the rendered text, including paragraphs
				set plainTextDoc to create record with {name:(name of currentRecord as string) & " Text", content:renderedContent, type:txt} in current group -- create a new plain text document from the rich text content
				if exists plainTextDoc then open tab for record plainTextDoc -- Optionally opening the newly created file
			else -- Error is there is no transcluded data detected
				display alert "This file doesn't appear to have transcluded content."
			end if
		else -- Error if it's not a Markdown file
			display alert "This is not a Markdown file."
		end if
	else -- Error if there's no content record, i.e., no file being viewed in the view/edit pane or a document window
		display alert "Please view a Markdown document to export the transcluded content to plain text."
	end if
end tell

Thanks!
So I think you’re suggesting a workaround here, right?
First one would convert the transclusion items into plain text in DTPO and then use the plain text files in DTTG? This would bring some added maintenance with it, though…

Did you try the script?
You don’t convert various Markdown files to plain text then run the script. You select a Markdown file with transclusions, run the script, and it generates a plain text file of the content including the transcluded data.