I pasted some centered text from Grammarly into Obsidian, and it appears like this:
It’s centered. I didn’t expect it to be centered. But here’s the thing I can’t figure out…why is it centered?
This is what it looks like in edit mode:
Looks the same in source mode and live preview. The first line appears to be 24 spaces indented, but when I try to type in the spaces manually or use Tab for another paragraph, I can’t seem to reproduce the centering. Only if I paste it again can I achieve this centering.
There are no HTML tags involved, either. And in edit mode, the paragraphs can be collapsed.
It’s pretty cool that the centering format was preserved, but does anyone know what markdown syntax it’s using? How is it centered?
Try pasting centered text into Obsidian from a Grammarly document and you’ll see what I mean.
If you find the same thing in justified, let me know.
Even though they look like spaces they are probably Nonbreaking Spaces which is a different character so Obsidian doesn’t treat them like normal spaces.
- Try this, copy the code below into a text file
- name the text file “nbsp.html” or anthing else that ends in an extension .html
- open it in your browser. It should look like this in the web browser:
- copy from the browser to an obsidian note
is how nonbreaking spaces are represented in HTML.
Interesting. Pasting from the HTML does have the spaces render. I suppose that’s what it is!
Hey, now all I have to do to “center” text without HTML tags is to paste a bunch of these! Thanks for your help!
You could save some time and strategically deploy them next time
← one space
← two spaces
← four spaces
<- one space
<- two spaces
<- four spaces
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.