Giter Club home page Giter Club logo

Comments (3)

GuySerfaty avatar GuySerfaty commented on August 11, 2024

Can you share code?
on my side:

  const editor = useEditorBridge({
    autofocus: true,
    avoidIosKeyboard: true,
    bridgeExtensions: [
      ...TenTapStartKit,
      CodeBridge.configureCSS(`
      * {
        color: red;
      }
  
      #root div .ProseMirror * {
        color: #404040;
      }
      `), // Custom codeblock css
    ],
    initialContent,
  });

image

from 10tap-editor.

jinwon7878 avatar jinwon7878 commented on August 11, 2024

Here's my editor code in dark mode!! Thank you for your quick response :)

// editor in dark mode

const editor = useEditorBridge({
    bridgeExtensions: [
      CodeBridge.configureCSS(`
      .tiptap {
         background-color: ${color.background}; // #212121 (black background)
         padding: 0 24px;
         font-size: 15px;
         color: ${color.neutral1}; // #E6E6E6 (white font color)
      }
      `),
    ],
    initialContent,
  });

As shown in the top photo, in dark mode (background color is black, text color is white), the selection background obscures the text. This selection background (similar to the font color) is only rectangularly wrapping around the text, not the margins.

Additionally, when I applied the solution, the result was as follows (background color is not changed)
IMG_1558
IMG_1559

from 10tap-editor.

GuySerfaty avatar GuySerfaty commented on August 11, 2024

@jinwon7878 - you didnt follow my solution at all

      #root div .ProseMirror * {
        color: blue;
      }

      * {
        color: red;
      }

      #root div .ProseMirror {
        background-color: black;
        padding: 0 24px;
        font-size: 15px;
      }

output:

image

please notice the:

      * {
        color: red;
      }

which does the trick here, change the selection color, then:


      #root div .ProseMirror * {
        color: blue;
      }

Will let you override the color to whatever you want to be the color of the actual text

from 10tap-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.