I got to an elegant snippet solution I really love (works only in live preview) that reformats both comments (the markdown syntax being %%
on either side) and inline footnotes (written as so: ^[your footnote here]
) into side comments in the right margin. I prefer using this with the inline footnote syntax instead of comments. & of course feel free to change the colors to your preference. See below:
.cm-comment-start,
.cm-comment-end,
.cm-inline-footnote-start,
.cm-inline-footnote-end {
color:transparent!important;
font-size:.1em;
letter-spacing:-1em;
}
.cm-comment-end::after,
.cm-inline-footnote-end::after {
content: " 💬 ";
font-size:16px;
text-shadow: 0 0 0 #609486;
position:relative;
bottom:3px;
}
.cm-comment:not(.cm-comment-end):not(.cm-comment-start),
.cm-inline-footnote:not(.cm-inline-footnote-end):not(.cm-inline-footnote-start) {
position:relative;
z-index:100!important;
display:block;
margin-left:10px;
margin-right:-265px;
margin-top:-25px;
float:right;
width:250px;
font-size:.75em;
padding:10px;
border: 1px solid black;
box-shadow: 5px 8px #609486;
color: black;
background:white;
}
/* The following is optional to keep comments & inline footnotes syntax editable inline */
/*
.cm-active .cm-comment-start,
.cm-active .cm-comment-end,
.cm-active .cm-inline-footnote-start,
.cm-active .cm-inline-footnote-end {
color:var(--text-faint)!important;
font-size:1em;
letter-spacing:initial;
}
.cm-active .cm-comment-end::after,
.cm-active .cm-inline-footnote-end::after {
display:none;
}
*/