Copy link to clipboard
Copied
I've added a multiline edittext in my scriptUI by enabling {multiline : true} it does introduce multi line edittext. But I can't able to use Enter button to introduce new line as I typing in the edittext area. So how can I have a edittext that takes multi line input from user intraction instead of Warping single line to multiple line?
Enter key seems to work just fine in this snippet.
Any chance you have any eventListener's in your panel, that listens for Enter key and therefore blocks the default editText behavior?
(function(thisObj) {
var win = (thisObj instanceof Panel) ? thisObj : new Window('palette', 'script', undefined, {
resizeable: true
});
win.alignChildren = ['fill', 'fill'];
win.preferredSize = [400, 300];
var et = win.add('edittext', undefined, undefined, {
multiline: true,
});
win.onResizing = win.
...
Copy link to clipboard
Copied
Enter key seems to work just fine in this snippet.
Any chance you have any eventListener's in your panel, that listens for Enter key and therefore blocks the default editText behavior?
(function(thisObj) {
var win = (thisObj instanceof Panel) ? thisObj : new Window('palette', 'script', undefined, {
resizeable: true
});
win.alignChildren = ['fill', 'fill'];
win.preferredSize = [400, 300];
var et = win.add('edittext', undefined, undefined, {
multiline: true,
});
win.onResizing = win.onResize = function() {
this.layout.resize();
};
win.show();
})();
Copy link to clipboard
Copied
Sorry it was my fault. I was trying to run the script in ExtendScript Toolkit itself. That's where the problem occurs. Eventhough I don't see any eventListerners for Enter key. It doesn't have the ability to create a new line when I run the script in ExtendScript Toolkit. And Thank you so much for giving me a new direction that eventListerners could block the behaviour of an element. BTW can you tell me why is it not working in ESToolkit?
Copy link to clipboard
Copied
No idea. Honestly, in my 8-year-old scripting career, I used ExtendScript Toolkit app maybe like 2 or 3 times.
Also, ESToolkit is dead, you should switch to VSCode + this https://marketplace.visualstudio.com/items?itemName=Adobe.extendscript-debug as soon as possible.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now