@DummyME
In the preview portion those are called by their standard html elements. <strong> for bold and <em> for italics. On the edit side they are called by classes “cm-strong” and “cm-em” respectively. For the preview mode you can also have different changes based on the class of the document.
As an example the below code with change emphasized words to green in edit mode, red in preview mode unless it has the css class of “test” in which case it would be blue:
Regarding this wonderful explanation, is there a way to display the src page of a header/block embed - as is presented with standard page embed ![[page ref]]? It would be nice to display not only the embedded header at the top of the transclusion, but also the file in which it resides.
What to do if I would like to have relative path in my edit mode (in md files) but don’t really want them to render as such? While in preview, I would like them to be stripped of path and just the filename.
This is link to a file : [[Vault/Folder/New File Name]]
I’ve got a snippet. It could do with something to make it look a lot nicer than just the default text, but it’s the key starting point.
The alt attribute of an internal-embed div contains text of the form “File name > header”, so this works well.
Unfortunately not, by the looks of it.
So much of CSS is about working with the structure and attributes of the HTML, and in this case it doesn’t look like there are any attributes that don’t also have the path in it. I don’t think there’s a way to do string splitting in CSS alone
Thank you. Truly appreciate it. I modified appropriately to fit the style - looks great.
Current Status: (now I no longer need to use “Fleeting Note” in my header, since I now know its from a fleeting note )
Is there a way to carry the content into the markdown-embed-link area? Ultimately I am trying to display the note title in the link area when its a whole embedded note. In other words bringing it down in line with how the header title is embedded.
E.g.:
I would love to have it after the special red character there. The problem I then might have though is how to basically create an “if” statement (the only language I know how to describe it - though not in CSS) where if it is a full-page embed like the latter image, it would have a display: none; parameter. But if its a header or block embed, it would display the file name.
Thanks again for your help. Carrying data to other locations via CSS is something I have no experience with. I can modify a great deal on the beginner level, but not so in this area.
This looks great, thank you so much for sharing. Just wanted to let you know is not working for me on v.0.10.1 I tried different backgrounds and line colors.
I found that this can be fixed by removing width:50% from the .markdown-preview-view img code block.
It’s one the solutions that’s most accessible. Although, be careful with the amount you input for the resizing notation, you can receive a overblown image with the hover if you set it to a large amount.
Can someone share a code snippet that can increase or decrease text font size in preview and editing mode, I can play around and make it optimal for me.