Editor mode - change tags?

Hi!

Another day another question :see_no_evil:

Is there any CSS snippet that can be used to change the tag text colour and background colour in editor mode?

I’ve found a snippet but that only works when I change to reading mode but I am 99.9% always in editor mode so was wondering if anyone knew of any code applicable to that?

Thanks in advance!

Have a look here →

Tags in Editing view (source and live preview) have three parts: The main section for background, text color, etc., and then the beginning & end for paddings and borders.

For example, here Reading and Editing view tags are separated:

/*---- reading view tag ----*/
.tag[href="#Google"] {
    background: #fff;
    color: #176bef;
    border: 2px solid #176bef;
    line-height: 2em;
    font-weight: 500;
    padding-top: 1.5px;
    padding-bottom: 3px;
}

/*---- source + live preview tag ----*/
.markdown-source-view .cm-tag-Google {
  background: #fff;
  color: #176bef;
  border-top: 2px solid;
  border-bottom: 2px solid;
  line-height: 2em;
  font-weight: 500;
}

.markdown-source-view .cm-hashtag-begin.cm-tag-Google {
  border-left: 2px solid;
  padding-top: 1px;
  padding-right: 1px;
  padding-bottom: 3.5px;
}

.markdown-source-view .cm-hashtag-end.cm-tag-Google {
  border-right: 2px solid;
  padding-top: 1px;
  padding-bottom: 3.5px;
}

Screenshot 2023-11-14 at 5.09.04

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.