Line Wrap in source mode or when editing table entry

How can I turn on Line Wrap when editing a table or in source view mode

I’m in love with Obsidian. BUT, I’ve run into what seems to me like it ought to be a very simply problem to fix, but I can’t find a solution.

I have some tables where the “Notes” column is pretty long. It’s easy to read when viewing the table. But when I try to edit that entry, whether by clicking on that particular line in the live editor or by switching to source mode, the line does not wrap. I have to painfully scroll left and right to try and get to the part of the entry I want to edit.

I’m a new obsidian user, and I’m sure I’m missing something very simple. Isn’t there a simple switch somewhere that would turn on line wrap when I’m in source mode, or when I’m editing a particular line?

Thank you

This isn’t something that Obsidian natively supports, but it’s pretty easy to do using CSS snippets. I will warn you though, long tables with wrapping cause confusion regarding which column you’re actually editing. That being said, here’s how to do it.

  1. Open settings > Appearance and scroll to the bottom. Find the heading labeled CSS snippets and click on the little folder icon to open your snippets folder.
  2. Create a new text file and rename it to table-wrap.css (be sure to delete the existing file extension otherwise this won’t work).
  3. Open the .css file and copy the below code into it. Save the file and return to Obsidian.
  4. Click the refresh icon, then click the switch next to table-wrap to turn it on.

Hope this helps

   Cribbed from the excellent ITS Theme 
.cm-s-obsidian .HyperMD-table-row.HyperMD-table-row.HyperMD-table-row {
	white-space: pre-wrap;
	min-width: min-content;

Thank you, that is what I needed!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.