You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separate lines in code or liveCode blocks are all in the same text node, separated by newlines; so line-oriented operations don't work right. For example, control-k to delete to the end of a line deletes to the end of the block.
One way to fix it would be to specialize all the relevant editing operations in code blocks: split the single text node at newlines and do the right thing.
Another way to fix it would be to put each line in a separate node (wrapping a text node) so the default editing operations work correctly. It would be a little more difficult to do parsing / highlighting, and existing documents would need upgrading.
Yet another way would be to make code blocks into voids with a non-Slate editor. This would avoid the need to reimplement a bunch of code editor stuff, but having a hybrid editor would probably complicate other things.
The text was updated successfully, but these errors were encountered:
Separate lines in
code
orliveCode
blocks are all in the sametext
node, separated by newlines; so line-oriented operations don't work right. For example, control-k to delete to the end of a line deletes to the end of the block.One way to fix it would be to specialize all the relevant editing operations in code blocks: split the single text node at newlines and do the right thing.
Another way to fix it would be to put each line in a separate node (wrapping a
text
node) so the default editing operations work correctly. It would be a little more difficult to do parsing / highlighting, and existing documents would need upgrading.Yet another way would be to make code blocks into voids with a non-Slate editor. This would avoid the need to reimplement a bunch of code editor stuff, but having a hybrid editor would probably complicate other things.
The text was updated successfully, but these errors were encountered: