It would be nice to have a text editor component with syntax highlight, line numbers, autocompletion.
I'll probably give it a shot if someone can give an overview of how to implement this efficiently in UWP.
@adrientetar So, that would be a Code Editor, and not a Text Editor?
If that's so, we should reuse the beautiful Monaco Editor. https://microsoft.github.io/monaco-editor/
I suppose the easiest way to integrate it is to use an embedded webview.
Well, code is a special kind of text.
I am using Monaco in a web view currently but:
Those are some of the advantages of using native controls, I mean many controls on this repository could probably just be done in a web view as well.
@adrientetar Nice arguments. A native Monaco editor for UWP would bring a better user experience but from my point of view, it's a huge amount of work unless someone already did it.
I don't say we should not do it, we first need to see the value of this. Can you create a uservoice entry for a native Monaco editor? Here is the link https://wpdev.uservoice.com/forums/110705-universal-windows-platform/category/193402-uwp-community-toolkit
I can't believe the timing of this. I just started wrapping Monaco in a UWP runtime component this weekend: https://github.com/hawkerm/monaco-editor-uwp
Not sure if it makes sense to pull into the toolkit with the dependency, but it's a start. There's a lot of work left to be done on the wrapper, but I did fix your first issue on your list. It doesn't show until it's ready to render, so there's no flash of a white blank page.
@hawkerm Nice. When do you think you can have a first version with the most wanted features (drag'n'drop, C# <-> JS communication, events) ? Can you post some screenshots of the result once it is done?
I suppose we can integrate it in the Toolkit later but first, I think you should stay on your repository for now.
@Odonno I'm developing it for some other projects, so whatever I need for those is going to get done first, next on my list are things like line highlighting (for like error messages).
I did take a look at drag'n'drop quite a bit last night actually. I had some of the tracking and event propagation hooked up, but there are a couple of issues. 1) I can't see a way that UWP let's you construct your own DragEventArgs, so the interface will have to be a bit different/simplified. 2) JavaScript/Edge serialization of the drag event in JavaScript doesn't work for some bizarre reason and returns a blank object. So, I'll have to do some more of the event parsing manually in JavaScript to hand-up to the C# layer.
This project is actually bleeding into my work life too, so I'll actually be working on this later in August more for some other Toolkit related things.
Released an update with very basic line highlighting support and keydown intercept support. (Had to rename the editor to not conflict with the namespace, so it's a breaking change).
This issue seems inactive. It will automatically be closed in 14 days if there is no activity.
I still see a great added-value on this control.
@hawkerm How is it going?
Otherwise, I am interested to see what @nmetulev used to render live XAML editing in the new Sample app.
The sample app is using @hawkerm's control :)
@nmetulev Good. It looks like a really functional components.
Hey! What's the status of this issue?
@adrientetar what's the status of this issue?
@adrientetar any update? 猬嗭笍
@Kyaa-dost we can assign to me. I think we just need to decide if we want to pull this into the toolkit or not.
@hawkerm Sounds good! I have assigned it to you for now.
Most helpful comment
@Odonno I'm developing it for some other projects, so whatever I need for those is going to get done first, next on my list are things like line highlighting (for like error messages).
I did take a look at drag'n'drop quite a bit last night actually. I had some of the tracking and event propagation hooked up, but there are a couple of issues. 1) I can't see a way that UWP let's you construct your own DragEventArgs, so the interface will have to be a bit different/simplified. 2) JavaScript/Edge serialization of the drag event in JavaScript doesn't work for some bizarre reason and returns a blank object. So, I'll have to do some more of the event parsing manually in JavaScript to hand-up to the C# layer.
This project is actually bleeding into my work life too, so I'll actually be working on this later in August more for some other Toolkit related things.