erykwalder / quoth

MIT License
41 stars 1 forks source link

inline does not work for me (on desktop windows) #16

Open amglez opened 1 year ago

amglez commented 1 year ago

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. 
erykwalder commented 9 months ago

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.

simonfossom commented 9 months ago

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)