substance / texture

A visual editor for research.
MIT License
1k stars 86 forks source link

Preformat: Not possible to add multiple lines #1219

Closed michael closed 5 years ago

michael commented 5 years ago

It should be possible to edit multi-line preformat blocks. Currently ENTER breaks the node and creates a paragraph underneath. Either we interpret ENTER differently when editing a preformat or at least allow Shift+ENTER to create a new line within the current preformat block.

Integral commented 5 years ago

This is not supported by Substance library currently, e.g. Substance will insert default node type. Newline shift+enter also not supported.

Integral commented 5 years ago

I think it would not be a hard thing to change this strategy and make it more configurable. Let's wait for @oliver----. @michael is that a special thing that we do not use new lines (line breaks)? I think for the preformat type or code it is very important feature. Let's look at trivial example:

for (var i = 0; i < 9; i++) {
  str = str + i;
}

For now you will only be able to input this:

for (var i = 0; i < 9; i++) {

  str = str + i;

}
obuchtala commented 5 years ago

This has been solved via #1231