abhaynikam / react-trix-rte

React wrapper for Trix rich text editor created by Basecamp
https://abhaynikam.github.io/react-trix-rte
MIT License
71 stars 10 forks source link

Upgrade Trix to v2 #72

Open mech opened 9 months ago

mech commented 9 months ago

Hi,

Is there a way to upgrade the Trix from v1.3.1 to v2.0.8 as it fix quite a bit of Safari bugs.

Regards

abhaynikam commented 9 months ago

@mech Thanks for reporting the issue. I'll try upgrading the Trix version this weekend.

mech commented 9 months ago

Tks! I actually do the upgrade myself (https://github.com/mech/react-trix-rte/commits/master/), but using Next.js project it somehow failed to perform "next build". It hang actually. Now I basically rebuild the dist/index.js and use that directly and also referencing the trix.js directly using <script>.

// Use the one from dist/index.js directly (copied to public/react-trix-rte.js)
const {
  ReactTrixRTEToolbar,
  ReactTrixRTEInput,
} = require("public/react-trix-rte");
<!-- At my Next.js _document.js file -->
<script src="/trix-2.0.8.js" />

I am not sure why "next build" fail while development can work though 🤪

Just FYI if you still free to investigate.

FYI also the node-sass I changed to sass as it will not compile also.

OtherCroissant commented 5 months ago

@abhaynikam Can I help fixing this?

quan612 commented 3 months ago

@mech any chance you get it works with next build

I get the same issue

mech commented 3 months ago

Not recommended. I do it myself on my own fork at here: https://github.com/mech/react-trix-rte

See if it helped. But I have moved on to TipTap editor already.

OtherCroissant commented 2 months ago

I have currently fixed this with resolutions in the package.json