Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

does blockly supports text area

95 views
Skip to first unread message

Peter Cheung

unread,
Dec 2, 2024, 10:43:34 AM12/2/24
to Blockly
Dear All
   does blockly support text area for multiple lines input? I am building a newblock to support java coding.

2024-12-02_20-39.png
thanks
Peter

Neil Fraser

unread,
Dec 2, 2024, 10:46:19 AM12/2/24
to blo...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/blockly/fbca20a2-a4d4-4ba8-a696-6dd7655a0725n%40googlegroups.com.


--
Neil Fraser, Switzerland
https://neil.fraser.name

Peter Cheung

unread,
Dec 2, 2024, 11:17:53 AM12/2/24
to Blockly
yes thanks, using it now

Mark Friedman

unread,
Dec 2, 2024, 3:55:07 PM12/2/24
to blo...@googlegroups.com
Hi, Peter!  Since you're talking about creating a block for creating/editing code I thought I would point you to this previous post of mine about some work I did on this a while back.

Hope this helps.

-Mark


--

Max Stephen Russell

unread,
Dec 2, 2024, 4:32:39 PM12/2/24
to Blockly
Is that plugin supposed to be fully functional in the playground with the multiline toolbox samples? If I merely tap in a text field without editing The Jabberwocky, and then cancel to close the input dialog, or if I add text, the fields shrink to a single line height.

Steve

Mark Friedman

unread,
Dec 2, 2024, 5:31:43 PM12/2/24
to blo...@googlegroups.com
Hi, Max!  I tried, but I guess I didn't put enough caveats/warnings in my post and in the README for the GitHub repo :-(  I have not yet refactored and packaged that code to be a proper standalone plugin, nor have I modified it to work with the current version of Blockly. So it's not surprising that you would run into difficulties.  If you (or anybody else) is really serious about needing this, please let me know and I'll try to carve out some time to do the necessary work.  I'm also very open to someone contributing a PR ;-)

-Mark


Max Stephen Russell

unread,
Dec 2, 2024, 7:27:21 PM12/2/24
to Blockly
Hey Mark,

I had read the README but not your post until later. I was in Chrome while in the playground.

Actually, I am barely getting started with Blockly, but your multiline invention looks very promising and pleasing to the eye. My app will be strongly text-based, so I expect a multiline capability to be absolutely essential to my success. Until now, I didn’t realize I had a problem on my hands — and maybe a solution.

Thanks.

Steve
Max Stephen Russell

Mark Friedman

unread,
Dec 3, 2024, 1:28:59 PM12/3/24
to blo...@googlegroups.com
Steve,

  I realize that I may have misunderstood your original question.  I thought that you were asking about my code editor field, but I think that maybe you were asking about Blockly's multiline input field plugin.  Sorry about the confusion.

-Mark


Peter Cheung

unread,
Dec 8, 2024, 8:02:26 AM12/8/24
to Blockly
thanks Mark

Peter Cheung

unread,
Dec 8, 2024, 8:02:45 AM12/8/24
to Blockly
Hi , yes, it works
Message has been deleted
Message has been deleted

Christopher Allen

unread,
Dec 23, 2024, 10:49:31 AM12/23/24
to blo...@googlegroups.com
Hi Max,

Am I correct in concluding that this plugin does not provide word wrap?

If you are talking about the field-multilineinput plugin that Neil linked to: 

On Monday, December 2, 2024 at 10:46:19 AM UTC-5 Neil Fraser wrote:

…then you are more or less correct because, although the field editor will perform word wrap while editing, long lines will be truncated with an ellipsis (…) when editing is complete.

It should be relatively easy to change this behaviour if desired by subclassing FieldMultilineInput and overriding the getDisplayText_ method (though you may find it necessary to implement your own word wrapping rules), then registering your new field type in the same way that the original is registered.


Best wishes,

Christopher

Max Stephen Russell

unread,
Dec 23, 2024, 11:20:39 AM12/23/24
to Blockly
Thank you so much for your guidance and links on this topic which will be of prime importance to me, Christopher!

Steve
Max Stephen Russell

Reply all
Reply to author
Forward
0 new messages