Replies: 3 comments 7 replies
-
|
Hey @rorywalsh that's a great question, with an answer that you might find unfortunate :). It would likely be extremely hard to get one of the existing js editors (like ACE) working against React-JUCE. Those editors are just built against a different DOM that has a proper CSS parsing engine. For react-juce to reach that level of compatibility with existing js frameworks would require that react-juce basically become a browser, which we don't want to do. If you really want to pull something like ACE into your project, I'd recommend using a WebView (i.e. juce::WebBrowserComponent) and using a proper web frontend which can support js code editors like that out of the box |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply Nick. It's a pity this isn't possible. I thought I was after cracking it! I'm still interested in learning more about your framework though. I've lots of react tutorials lined up. I went down the road of the WebBrowserComponent before, but I had issues setting up communication between the editor and the main app. The issue I had was I had no idea how to do it 😆 I guess it should be possible to set up some kind of hooks between the webview and the main app, but I've no idea how. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, the issue was the editor hosted in the WebView was eating all keystrokes. So where Ctrl+S should have triggered a save in the JUCE app, it was just consumed by the WebView. I think it's a common issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @nick-thompson. Great framework, thanks for sharing. I was able to get the demo built in no time 👍
So I'm a long suffering user of the juce::CodeEditorComponent. I find myself constantly hacking it just to provide functionality that comes out of the box with other editors. There are now a growing list list of excellent JS editor components. I'm wondering if it would be possible to use one of these, say ACE editor, within your framework, all neatly tied back to a JUCE::FileBasedDocument? I've a feeling you might say yes, in which case can you provide me with some direction, I really don't know React at all 😬 But I'd be willing to put in some work if it meant I could give my users access to a good text editor ;)
Beta Was this translation helpful? Give feedback.
All reactions