react-trix-rte icon indicating copy to clipboard operation
react-trix-rte copied to clipboard

Upgrade Trix to v2

Open mech opened this issue 1 year ago • 6 comments

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

mech avatar Jan 26 '24 06:01 mech

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

abhaynikam avatar Jan 28 '24 18:01 abhaynikam

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.

mech avatar Jan 29 '24 00:01 mech

@abhaynikam Can I help fixing this?

OtherCroissant avatar May 28 '24 12:05 OtherCroissant

@mech any chance you get it works with next build

I get the same issue

quan612 avatar Aug 07 '24 02:08 quan612

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.

mech avatar Aug 07 '24 02:08 mech

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

OtherCroissant avatar Aug 13 '24 08:08 OtherCroissant