rob-myers

Results 26 comments of rob-myers

@supnate 's great solution also works for tsx: - Get [PrismJS for React Tsx](https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+clike+javascript+jsx+tsx+typescript) (only need the js). - Use it to [highlight syntax in a web worker](https://github.com/rekit/rekit-studio/blob/cd03a3d321ceb0b0adab085589751bb160e13016/src/features/editor/workers/syntaxHighlighter.js), modulo this:...

After more fiddling, @cancerberoSgx 's approach seems best. Unfortunately Prismjs handles generic types incorrectly, and confuses comments with `JsxText`. Rather than concatenating CSS classes, we can decorate intervals with a...

@luminaxster Nice, I'll look into `jscodeshift`. However your highlighting is a bit off: ```tsx const foo = ( // foo ) ``` The `// foo` should be literal text (not...

@luminaxster there is another issue: ```tsx // foo {'bar'} ``` where `{'bar'}` is incorrectly highlighted by Monaco's js highlighter. Although it seems like an edge case, it comes up frequently...

@JLHwung do you mind providing an example? This code fails when my visitor uses `.getSource()`: ```tsx import * as babel from '@babel/core'; // ... const parsed = babel.parseSync(code, { filename,...

Scrolling and editing seems to be possible, see e.g. [here](https://nihgwu.github.io/react-runner/). The respective [code](https://github.com/nihgwu/react-runner/blob/bceaf82b567c9a290089a0e48a023e8872bda94d/website/src/components/LiveRunner.js#L25) amounts to e.g. ```tsx const CodeEditor: React.FC = () => { const [code, setCode] = React.useState(` function...

> when the main image is zoomed, if you try to swipe to the next image, the image is zoomed out, but the slide still have the class swiper-slide-zoomed that...

There seems to be a typing issue in your particular case. I'd just use: ```tsx engine.getLayerFactories().registerFactory(new NodeLayerFactory() as any); engine.getLayerFactories().registerFactory(new LinkLayerFactory() as any); ``` The types do work when creating...

Here's a rewrite of the demo project, avoiding the dependencies `dagre`, `pathfinding` and others. You'll also need to include [the css](https://github.com/projectstorm/react-diagrams/blob/d2f05438b8620147d7aa835f2799a0f56397d4e3/diagrams-demo-project/src/main.css). ```tsx import { useEffect, useState } from "react"; import...

Looks like ye olde server-side-rendering issue. Perhaps using nextjs dynamic import will help: > https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr