NotionX / react-notion-x

Fast and accurate React renderer for Notion. TS batteries included. ⚡️

Home Page:https://react-notion-x-demo.transitivebullsh.it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding the option to show latex code when clicking equation blocks

Mapaor4 opened this issue · comments

Description

Change of CSS to allow clicking a block equation and displaying the latex code (just as in Notion)

I am not sure how the repo behaves (I'm quite new here), but could it be that just requires changing the .notion-equation CSS attribute inside packages/react-notion-x/src/styles.css?

Codepen example

I created a minimal working example with codepen to show an example of CSS (and JS) that would allow for this functionality

Try it here: Equation block - click to show code (like Notion)

Forgive me if the code is not quite clean. I am new to both CSS and JS.

I would really appreciate if someone could look into this and tell me if it's possible to implement this function, it would be a game changer for the website I am trying to build. Tanks again :)