quoth icon indicating copy to clipboard operation
quoth copied to clipboard

inline does not work for me (on desktop windows)

Open amglez opened this issue 2 years ago • 2 comments

I would write something like:

path: [[**somePage**]]
display: inline
ranges: "Word1" to "Word2)"
''' , some other text here.

I was hoping to get something like:

Word1 bla bla Word2, some other text here.

But I get:

Word1 bla bla Word2

, some other text here. 

amglez avatar Jan 04 '23 17:01 amglez

Yeah, not sure the best way to go about this. I meant inline more as in contrast to embedded style, not within a paragraph. If this was ever added, it'd have to be a different keyword unfortunately.

The other thing is that the way obsidian treats extensions as separate blocks by default, so it take some work to get it to display correctly in live and reading modes.

erykwalder avatar Oct 13 '23 01:10 erykwalder

It could be done with JS. Something like:

document.addEventListener("DOMContentLoaded", function() {
  // Locate the <em> element
  const emElement = document.querySelector('.internal-embed .el-p p em');

  // Create a new <span> element
  const newSpan = document.createElement('span');

  // Copy the text from <em> to <span>
  newSpan.textContent = emElement.textContent;

  // Replace the <em> element with the new <span>
  emElement.replaceWith(newSpan);
});

I'd love to see it. My skills are not on this level yet.

(My implementation in CSS so far)

simonfossom avatar Oct 18 '23 06:10 simonfossom