icsharpcode / AvalonEdit

The WPF-based text editor component used in SharpDevelop
http://avalonedit.net/
MIT License
1.86k stars 470 forks source link

Can support fixed strings to the editor ? #355

Closed xiaohuahegege closed 2 years ago

xiaohuahegege commented 2 years ago

I want to ask is it possible to support fixed strings to the editor ? like this:

Line 1: 127.0.0.1:8888 > run command (127.0.0.1:8888 is fixed string, run command is entered by the user, I need to disable the user to remove 127.0.0.1:8888) Line 2: print the command result Line 3: 127.0.0.1:8888 >

siegfriedpammer commented 2 years ago

You can take a look at SharpDevelop's console implementation based on AvalonEdit: https://github.com/icsharpcode/SharpDevelop/blob/3f3ae2a5d4ffafd98cdf1c09308b9b8d93b0356c/src/Main/Base/Project/Src/Gui/Pads/AbstractConsolePad.cs

Especially https://github.com/icsharpcode/SharpDevelop/blob/3f3ae2a5d4ffafd98cdf1c09308b9b8d93b0356c/src/Main/Base/Project/Src/Gui/Pads/AbstractConsolePad.cs#L319

Hope this helps!

xiaohuahegege commented 2 years ago

@siegfriedpammer Thank you, is work for me