Skip to content

Instantly share code, notes, and snippets.

@Benunc
Last active August 29, 2015 14:26
Show Gist options
  • Save Benunc/437452b036d5b10fa72a to your computer and use it in GitHub Desktop.
Save Benunc/437452b036d5b10fa72a to your computer and use it in GitHub Desktop.
editor.windowManager.open( {
title: 'A popup dialog',
body: [
{
type: 'textbox',
name: 'text1',
label: 'enter your text',
multiline : true,
minHeight : 60,
},
{
type: 'container',
html: String( text1.length() ),
label: 'This changes dynamically based on length of text entered above',
}
],
@Benunc
Copy link
Author

Benunc commented Jul 30, 2015

I've also tried this.text1.length() and str.length(text1) among other things. Is what I am trying to do even possible?

@Benunc
Copy link
Author

Benunc commented Jul 30, 2015

I added an onchange: function() {...} block to the end of the textbox to declare a variable that I then call within the html: String() function. Not working yet.

@norcross
Copy link

I think you need to have the function to count outside of the window manager, and call it, targeting the class or ID of the text field

@Benunc
Copy link
Author

Benunc commented Jul 30, 2015

and then call that function inside of the html: block, or in the textbox with an onchange: or something?

@Benunc
Copy link
Author

Benunc commented Jul 30, 2015

I'm gonna put my actual plugin code with the new stuff up here, so that it becomes clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment