How can remove outline?

How can remove outline??

          <CodeMirror
            className="w-full h-screen dark:bg-[#1e1e1e] outline-none"
            value={ContentValue}
            onChange={ContentOnChange}
            theme={
              currentTheme.theme === "light"
                ? editorLightTheme
                : editorDarkTheme
            }
            extensions={[
              markdown({
                base: markdownLanguage,
                codeLanguages: languages,
                extensions: {
                  props: [styleTags({ CodeMark: Tag.define() })],
                },
              }),
              syntaxHighlighting(defaultHighlightStyle),
              syntaxHighlighting(
                HighlightStyle.define([
                  { tag: t.content, class: "text-black dark:text-white" },
                  { tag: t.heading1, class: "text-4xl dark:text-white" },
                  { tag: t.heading2, class: "text-3xl dark:text-white" },
                  { tag: t.heading3, class: "text-2xl dark:text-white" },
                  { tag: t.quote, class: "font-bold dark:text-white" },
                  {
                    tag: t.strong,
                    class: "font-bold dark:text-white",
                  },
                  {
                    tag: t.emphasis,
                    class: "underline dark:text-white",
                  },
                  { tag: t.strikethrough, class: "dark:text-white" },
                  { tag: t.link, class: "dark:text-white" },
                ])
              ),
            ]}
            basicSetup={{
              lineNumbers: false,
              foldGutter: false,
              dropCursor: false,
              indentOnInput: false,
              allowMultipleSelections: false,
              highlightActiveLine: false,
              autocompletion: false,
              rectangularSelection: false,
              highlightActiveLineGutter: false,
              highlightSelectionMatches: false,
              highlightSpecialChars: false,
            }}
          />

I’m using a tailwind-css with codemirror. I can’t remove outline. I swear I tried everything with tailwind-css.

EditorView.theme({
    "&.cm-focused": {
      outline: "none",
    },
 }),

Just add EditorView.theme to extensions.

2 Likes