yvan66 / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Feature Request: Multi line text blocks #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for all the great work on Blockly!

We're working on a Blockly implementation to setup virtual servers, and have 
found ourselves needing to allow users to create files with fairly large blocks 
of text, interspersed with substituted variables. 

So imagine a user wants to copy and paste a large block of text which is 
pre-formated, for example an XML file. 

And then have a few variables placed into the chunk of XML text. 

It would be nice if Blockly either had a field which allowed for multiline 
pre-formatted text and the dragging and dropping blocks into the text, or 
simply allow the user to split the text area into two and intersperse a 
variable. 

Essentially our use case boils down to:
1. User has a large chunk of pre-formatted text they wish to place into a 
Blockly block, and then have some blocky blocks inserted into the middle of it. 
2. The user wishes to retain the formatting in such a way that they can read 
the originally formatted text.

We've looked at the latest Blockly example where a mutator is used to append 
multiple lines together, but I'm not sure it is great for our use case because 
the user is left copy and pasting per line of text - which becomes a big hassle 
when you have 50+ lines of XML to do that with. 

Thanks,

Dave

Original issue reported on code.google.com by dtyre...@gmail.com on 16 Aug 2012 at 10:00

GoogleCodeExporter commented 9 years ago

Original comment by sper...@google.com on 8 Aug 2013 at 12:04

GoogleCodeExporter commented 9 years ago
I have create fieldTextArea that does a multi-line text editor. Please feel 
free to add to the Blockly codebase. 

Issues to solve - I know they will be simple but I need help.
* the blockly rect doesn't resize on enter - only when I start writing text 
this means when I hit enter initially the textarea overhangs the rect until I 
start typing.
* the same happens when I delete a line the rect is not resized correctly
* at the moment I'm using a fixed pixel height for each line - this feels wrong 
and I think the dimensions are out slightly

Happy to discus further

Regards
Andrew

Original comment by primary....@gmail.com on 31 Jul 2014 at 1:45

Attachments:

GoogleCodeExporter commented 9 years ago
Update - here is an improved version

Original comment by primary....@gmail.com on 31 Jul 2014 at 2:14

Attachments:

GoogleCodeExporter commented 9 years ago
I was thinking of how to enter comments in a Blockly program - and this may 
solve it - add a dummy variable "Comment" and assign it a block of text! 
Voila!! :-)

I think it's a good idea to encouraging budding programmers to comment their 
code!
--joe

Original comment by joeor...@gmail.com on 7 Oct 2014 at 3:34

GoogleCodeExporter commented 9 years ago
Please can you tell me what has to be done, to get this new field in the 
blockfactory.

Original comment by peter.ga...@gmail.com on 23 Feb 2015 at 10:19