Entering Code into a Forum Post
Hi All
Sometime on the morning of December 17th 2020, the "Code" item disappeared from the dropdown list "T" for setting the format of the post's text
II don't know if this was by accident or by design.
There is another way:
- Paste your AppleScript into the post editting window
- Select the text which is Applescript
- Click the </> icon; the selected text is converted into code.
This does lose all the indentation, but that isn't a problem as the AppleScript compiler adds the correct indentation when it compiles AppleScript copied from a post.
Special Symbols {< ,≤,≠} seem to come through correctly.
Indentation does improve readability; there is a way to maintain AppleScripts indentation.
After steps 1-3 above, select the code in the post's editting window. Paste the original Applescript code copied from Script Editor again - the code format is lost, and the selection is lost.
Now select the Applescript code again and click the </> icon; the original indentation appears, and the format is code.
-
Hi there,
I found yesterday when I went through your steps that I didn't have to do them twice to keep the Applescript formatting. I just had to click the </> button once after the (plain) pasted text was selected and the formatting was restored. At least it looks that way to me, unwrapped lines notwithstanding. Maybe they're updating things behind the scenes while we type...
0 -
Quite often you’ll need an empty line above specific formatting to make it work. You’ll also have to type blank lines to create proper paragraphs; just pressing Return once and then typing a new block of text right below a previous block only creates a so-called line break.
0
Post is closed for comments.
Comments
2 comments