Line break Formatting Issue on Dropbox Action

Hello,

The write to Dropbox action writes a Drafts note fine but does not implement any line breaks. So each paragraph in Drafts is a single continuous line when opening up the document on Dropbox. Any hints on how to make the documents once in Dropbox have line breaks?

Thanks,

The standard " Save to Dropbox" action works fine for me. Line breaks are maintained when saving out to file.

Can you share a link to the “write to Dropbox action”? Maybe we can spot something on how it is setup that might explain what you are seeing?

Hi,

See example below:

This is really about Dropbox’s web display of text files. It does not “soft wrap” like most editors to make the lines fit the width of the display.

In reality, you do not want line breaks added, but just want it displayed more nicely.

You can get this to display better in Dropbox if you export as a different file type. For example, Dropbox will wrap text when displaying Markdown file types. If you change your “Save to Dropbox” action to save the file with a .md file instead of .txt, it will come out better for on-screen viewing in their web interface.

You can do that by editing the action, and changing the “Name” value in the Dropbox action step to end in .md.

Hi Greg,

Worked like a charm. Thanks and kudos to you for a great product!

I changed
let path = “/” + draft.processTemplate("[[time]].txt");

to

let path = “/” + draft.processTemplate("[[time]].md");

// options
let path = “/” + draft.processTemplate("[[time]].md");
let content = draft.content;

1 Like