In the new forum is it possible to use the code formatter when replying to a post? I don't see the button in the tool bar for replies.
Solved! Go to Solution.
Hi Joe, the text editor in replies looks slighty different from the original post version with the three dots at the end of line 1.
If you click on Formats then you'll see all the other Rich Text Editor options including Insert code.
Let me know if you see this ok in your view and this works for what you're trying to do.
Hey everyone thanks for the patience on this issue. The text editor has now been updated by our support team to provide the full text editor experience whether you are composing a new message or replying to a post or editing a previous reply. Apologies this issue has impacted your work in the community and thanks for working with us on this.
Inline Reply - Collapsed View
Inline Reply - Expanded View
Let me know if you still see any other issues.
Hi Joe, the text editor in replies looks slighty different from the original post version with the three dots at the end of line 1.
If you click on Formats then you'll see all the other Rich Text Editor options including Insert code.
Let me know if you see this ok in your view and this works for what you're trying to do.
Son of gun: there it is! Looked at the Formats pull down but didn't go deep enough...
Hi @Anonymous User ,
Just a follow-up question... how do you define the code language (Python, JavaScript, etc...)?
It may also be good to update the community help document since it is still referring to the "old" way: https://community.esri.com/t5/community-help-documents/how-to-insert-code-in-your-post/ta-p/914552
Thanks Xander yes I noticed that in further testing too. I think we need to ensure we have the full text editor experience in replies that we have in new posts and this is what I've asked our support team to switch out for us. For now i'll update the known issues list with this Formats as a temporary workaround to include some simple HTML formatting but that the code insert is not the full version. I'd recommend using the Pre option under the Block rather than the Inline code one which created some funky errors when I tried it.
There is a bunch more testing to do: I just tried it and if I use the code format option that you mentioned earlier and try to post I get an html error and my reply does not post. The code editor for replies does not seem to work as hope.
"pre" works under Formats Blocks
def code_test():
"""Test"""
print("code test")
return
import arcpy
fc = r'C:\some\file.gdb\someFeatureClass'
for field in arcpy.ListFields(fc):
print(f.name)
'''
it's kinda clunky; I tried to break out of this into another paragraph and haven't
figure that out just yet....
'''
def code_test():
"""Test"""
print("code test")
return
hit the arrow key
def code_test():
"""Test"""
print("code test")
return
Lets see....
code goes here
and here...
Ahh, the old down arrow key trick! Why didn't I think of that?!