Jetpack compose provides lots of material components like TextField etc. However, to build something like a file editor, what kind of component can be used that supports multiple lines of text any long with text operations like selecting text, cut-copy-paste, etc.
Would be interested to know equivalent component for Jetpack compose desktop as well.
For Compose Desktop, you can use a Swing component like RSTextArea
I wrote a blog post about how to embed it.
Android EditText can be a good option for code editor, you can make a custom edittext and use it inside compose's AndroidView
Compose's AndroidView can also infalte ui from xml file
There is an official sample on GitHub by jetbrains for an editor
https://github.com/JetBrains/compose-jb/tree/master/examples/codeviewer
Related
In my project I created a Webview extension for Visual Studio Code. Inside the Webview I have a text editor (currently monaco editor) and a graphical Modeler.
Now I wondered if there is any way to replace the monaco editor inside my Webview with the standard editor of Visual Studio Code. This would be extremely helpful because I would not have to worry about connecting the custom text Editor to my LSP Extensions and also have 100% the same functionalities as in the rest of Visual Studio Code.
Do You know of any way in which I could achieve this goal?
Best Regards
Thomas
The feature request you are looking forward is https://github.com/microsoft/vscode/issues/93265
It is being implemented
In VS Code Help > Interactive Playground you can have an idea of what it will look like, even if it is not exposed through the API yet.
Meanwhile, vscode-python configures the Monaco Editor to look as much as possible to the native text editor.
I built some views that extend layouts from package com.vaadin.flow.component.orderedlayout. The problem is there are a lot of useful stuff in package com.vaadin.ui like Link, PopupView etc that I can't add to my views. I tried making my view extend UI from com.vaadin.ui but that doesn't work, I get the following error:
Failed to load the widgetset.
What is the best solution to my problem? How can I add the needed stuff to my view?
I have just started using Vaadin few days ago.
com.vaadin.ui is Vaadin 7 or Vaadin 8. com.vaadin.flow is Vaadin 10+. Those two cannot be used together unless you're using the commercial multiplatform runtime.
For Link, you can instead use the Anchor or RouterLink components. There isn't any direct replacement for PopupView, but it should be possible to assemble something similar by combining Button and ContextMenu. See https://vaadin.com/docs/flow/migration/5-components.html for a full overview of the relationship between components in the old and new versions of Vaadin.
I want to open PDF files from assets but inline with other flutter widgets, like in column widget.
I have used flutter_pdf_viewer plugin. Although being a good plugin, it opens PDF files as a new activity instead of embedding them or display them inline with other widgets.
Can anybody help me figure out how to achieve this?
The flutter_pdf_viewer plugin has a working MVP for inline pdfs available at the inline branch.
A full example is available here.
It still has some stability issues, which are being discussed over here.
In the latest master builds of Flutter, there is an AndroidView widget that allows you to display native android views.
Combine with AndroidPdfViewer to display an interactive PDF in a widget.
Of course that will only work on Android. Right now there is no comparable solution for iOS.
I am looking for the source of the embedded markdown editor that GitLab uses in their issue tracker. It looks like this:
Note that this is not the same as the code editor they use e.g. to display the source of files within the repository. I am hoping that the above editor is (some extension of) an open-source project, but I could not find it.
For a school project i need to write or use a online programming editor. It is a part of a bigger project. I thought of a java application, php/html/javascript or flash.
I have a couple of things i could do:
Find a good working application and edit it so it works with the rest of the project
Find good parts for a editor and make it working my self (syntax highlighter, auto-indent, autocompletion, etc.)
Combination of those two
Does anybody know a good editor or have tips for this project or a editor?
Thanks for reading,
Leon
For the syntax highlighting and basic editing part, check out my recent question Textarea that can do syntax highlighting on the fly?
Solutions presented there:
CodeMirror
Bespin (Mozilla only, but great)
For the rest - autocompletion etc. - ... Check out the Wikipedia article Comparison of JavaScript-based source code editors
Interested to see what other suggestions come up.
Bespin comes to mind. Though it might be too bleeding edge, depending on how the rest of the project is built/meant to be used (but hey, programmers love bleeding edge).
If you decide to use PHP/HTML/CSS/JavaScript, see GeSHi for syntax highlighting.
I have a side project developed with ACE.
It connects to your server through SFTP and allows you to create new files,read and edit all from your browser with your file tree at sidebar.
Demo at TePe
Code at Github Repo
I found Cobalah Editor it's also built on CodeMirror but with some customization. There are some themes available we can set, increase or decrease font size.