Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to edit the existing typed code in the editor #59

Open
4 tasks
rafaelcamargo opened this issue Jul 10, 2019 · 1 comment
Open
4 tasks

Allow users to edit the existing typed code in the editor #59

rafaelcamargo opened this issue Jul 10, 2019 · 1 comment
Labels
enhancement New feature or request
Projects

Comments

@rafaelcamargo
Copy link
Member

According this comment, figure out a way of offering a way to edit some already typed code.

Users should be allowed to:

  • Add an entire new line in the middle of the existing code
  • Add a new char in the middle of some existing line
  • Remove an entire line
  • Remove a char from a specific line
@rafaelcamargo rafaelcamargo added the enhancement New feature or request label Jul 10, 2019
@rafaelcamargo rafaelcamargo added this to Not Planned in Roadmap Jul 10, 2019
@quinton-ashley
Copy link

It could look like this:

demo  
  .openApp('editor', {minHeight: '350px', windowTitle: 'demo.js'}) 
  .write(codeSegment0) //initial code 
  .write(codeSegment1, {insertAt:{line:2}}) // insert at start of line 2, default char 0
  .write(codeSegment2, {insertAt:{line:6, char:5}}) // insert after line 6, char 5
  .replace('', {from:{line:2}, to: {line:4}) // remove lines 2 through 4
  .replace(codeSegment3, {from:{line:8, char: 3}, to: {line:8, char: 10})
  .end()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Roadmap
  
Not Planned
Development

No branches or pull requests

2 participants