bkonia
When pasting plain text into a note, indentations are lost. It doesn’t matter whether you’re using spaces or tabs, it’s all trimmed. This is extremely annoying when pasting in code blocks. TheBrain has a nice style for code blocks, but you have to manually add the spaces to create indentations, after pasting in the code block.

Perhaps we could have an option to “Paste as Code Block” and/or “Paste Plain Text” that would retain the spaces and tabs. It would be nice if “Paste as Code Block” would both retain the spaces/tabs and apply the Code Block style in one step.
Quote
bkonia
Also, it seems to treat line feeds as <br> tags, rather than <p> tags, which means a pasted plain text block will always be a single paragraph. Thus, if you try to manually indent lines using tabs, it will indent the entire block, rather than just the line. I’ve also tried adding spaces manually and after adding the spaces, it snaps back, automatically deleting them.

Thus, the only way to make it work is to manually hit Enter after each line, forcing it to create a separate paragraph. Additionally, this has the negative consequence of creating extra vertical space between each line. Thus, depsite the inclusion of a Code Block style, the notes editor is pretty much useless for storing code blocks.
Quote
mcaton
Brad,

I'm happy to document this as a feature request.  Can you provide a file with a small sample of the different variations (tabs, spacing, <br> vs. <p>, etc) for us to use for testing?

Thanks,
Matt
Quote
bkonia
Hi Matt,

I've attached two files, spaces.txt and tabs.txt. We should be able to paste the content of either of these into a note and have it retain the exact same formatting as in the plain text file and no extra space between lines. Each line should be treated as an independent paragraph, so it can be indented independently of the other lines, but with 0px top/bottom margins, so the lines display single-spaced.
Quote
korm
Perhaps related:  as the GIF shows, when spaces are inserted in the beginning of a line of text in a note, TheBrain b189 will remove the spaces after a while.   It does not matter how many spaces are typed - one, or two, or five, or more.   (Note: I am not backspacing or deleting -- TheBrain is doing that.)   b189 on macOS 10.12.5


[image] 
Quote
mcaton
Thanks everyone.  The tab/spaces being supported at the beginning of the line as been requested.

Matt
Quote
bkonia
Has there been any progress on this issue? When I paste text into code blocks, it still loses all the leading spaces/tabs, so you end up with all the text left aligned and you have to manually recreate the indentations.
Quote
mcaton
Brad,

Thank you for checking in.  We've been looking into this issue, but no update available quite yet.

Thanks,
Matt
Quote
bkonia
By the way, this scenario (weird/unpredictable text formatting) is another reason why Markdown support would be a great feature. Several other users and I previously requested Markdown and Harlan asked why we wanted it. There are a lot of good reasons to support Markdown, but one major benefit is that by editing the code directly, you can get the formatting exactly how you want it. With the current rich text editor, you can't see what's going on behind the scenes, so you could have extra spaces newlines, or other invisible characters that mess up the formatting. You can monkey around with it until it looks right, but since you can't view the source code, you don't know if it's really right or if you just tweaked it until it sort of looked right. When exporting the note or sharing it with other users, it may render completely differently in other applications. This has happened to me many times. I create a note in TB rich text editor, then copy/paste it into another application and the formatting is a mess.

With Markdown, you have a standard that will render identically in any Markdown viewer/editor and can easily be converted to HTML and other formats. Additionally, as I mentioned, you can edit the code directly to make sure it's correct. I'd propose that TB's note editor could be toggled between rich text mode (for backward compatibility) and Markdown mode. In Markdown mode, you'd have a View tab and an Edit tab. The Edit tab would be a plain text editor, perhaps with some button shortcuts to insert Markdown code, but giving the user full control over the code. Then you could switch to the View tab to view the rendered Markdown. When you switch to a new thought, it would display the View mode by default.

Pretty much all modern text editors have moved away from old-fashioned rich text editing toward Markdown-based editing. Some of these tools are sophisticated in that they allow you to perform edits in the View mode using traditional rich text buttons, but they still allow you to switch to plain text mode to work with the Markdown code directly. The point is, the underlying code is Markdown, not RTF or HTML, so it's standardized across all editors, human-readable, easily editable and easily converted to many other formats. Given that this is the dominant trend and has been for several years, it's disappointing that TB9 is still stuck in the old RTF/HTML paradigm.
Quote

Add a Website Forum to your website.

Newsletter Signup  Newsletter Signup        Visit TheBrain Blog   Visit TheBrain Blog       Follow us on Twitter   Follow Us       Like Us on Facebook   Like Us         Circle Us on Google+  Circle Us         Watch Us on Youtube  Watch Us       

TheBrain Mind Map & Mindmapping Software     Download TheBrain Mind Mapping Software