Let's say I put a code block in a post like so:
def Main():
print(hello
if __name__ == '__main__':
Main()
Oh, whoops, a typo! I forgot the parenthesis after "hello" on line 2. Or sometimes I realize I didn't word a comment clearly enough, or I forgot to include some piece of code.
But I can't edit a code block once it's embedded. I have to select it, delete it, and start again.
Sure, I can do copy/paste with the code in the code block to speed the process slightly, but it's still a pain. Why not allow users to hit an edit button on that code block and pull that dialog back up to make their changes?
def Main():
print(hello) ## oops
if __name__ == '__main__':
Main()
so this procedure isn't working
Sometimes I can double click on the code block to open up the editing dialog, but more often, as @DanPatterson mentions, I have to click on the code block, then click the "Insert/Edit code sample" button to begin editing it.
Hi @MErikReedAugusta, per @DanPatterson and @KenBuja, we've also tested the editing process by double-clicking the code block and doing a single click to select > use the code feature. These both worked on our end, though we note that there seems to be an inconsistent experience referenced when it comes to the double-click method. Because there is a way to do this, I'm going to close this idea but am tagging @SimiBasu for visibility in advance of an update we anticipate for the Esri Community platform later this year that's expected to improve the post editor.
Ah, I hadn't stumbled upon either of those methods. I'll start giving them a shot.
Thanks, all!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.