Help
The code editor on this site has many options that you can control via url parameters as well as within the editor itself. This can give you a very helpful way to share code snippets. Here are some of the options:In-Editor Options
On any editor you can press the button to change the editor's theme and CFML engine (note: you can also do so via url parameters - see below).
You can also maximize the editor by clicking the button. Click it again to toggle back to the default size.
URL Parameters
CFML Engine
One of the most powerful features of trycf.com is that it allows you to run the same code against all of the leading CFML engines. To force the default engine to a specific flavor, supply the engine
parameter with one of the following:
acf
:Adobe ColdFusion 10acf11
:Adobe ColdFusion 11railo
:Railo 4.2lucee
:Lucee 4.5lucee5.0.0.45
:Lucee 5.0.0.45 (beta)
Editor Theme
The cfml editor used here has many different themes to choose from. You can change this theme by using the url parameter theme
with one of the following options:
Bright Themes:
Example: https://trycf.com?theme=cobaltchrome
:Chromeclouds
:Cloudscrimson_editor
:Crimson Editordawn
:Dawndreamweaver
:Dreamweavereclipse
:Eclipsegithub
:GitHubsolarized_light
:Solarized Lighttextmate
:TextMatetomorrow
:Tomorrowxcode
:XCode
Dark Themes
ambiance
:Ambiancechaos
:Chaosclouds_midnight
:Clouds Midnightcobalt
:Cobaltidle_fingers
:idleFingerskr_theme
:krThememerbivore
:Merbivoremerbivore_soft
:Merbivore Softmono_industrial
:Mono Industrialmonokai
:Monokaipastel_on_dark
:Pastel on darksolarized_dark
:Solarized Darkterminal
:Terminaltomorrow_night
:Tomorrow Nighttomorrow_night_blue
:Tomorrow Night Bluetomorrow_night_bright
:Tomorrow Night Brighttomorrow_night_eighties
:Tomorrow Night 80stwilight
:Twilightvibrant_ink
:Vibrant Ink
Code Sharing
Github Gists
Sharing code snippets is made easy by integrating with Github Gists. If you already have a gist you would like to share you can use one of the following url patterns to do so:
- https://trycf.com/
gist/{your gist ID here}
: Obviously, use your real Gist ID. This gives you the default embedded editor - https://trycf.com/
editor/gist/{your gist ID here}
: Again, use your real Gist ID. This gives you the full-screen editor
Setup Code
Sometimes to share an example you need some environment setup that you don't necessarily need in your code example (i.e. setup a query object). In these cases you can provide a second gist that will be executed prior to your code to setup environments.
To use this feature you'll need to do two things:
- Create a second Github Gist
- Add the
setupCodeGistId
url parameter indicating the gist Id you previously created
- https://trycf.com/
gist/{your gist ID here}?setupCodeGistId={your second gist ID here}
: Obviously, use your real Gist IDs. This gives you the default embedded editor - https://trycf.com/
editor/gist/{your gist ID here}?setupCodeGistId={your second gist ID here}
: Again, use your real Gist IDs. This gives you the full-screen editor
Note: You will be able to inspect both Gists using the link above the editor Note: You can also specify the
engine
inline here by appending /{your engine selection}
, so for example:
- https://trycf.com/gist/5f2067cfa0753aea0d94/acf11
- https://trycf.com/gist/7b7fb26978628a6ba7e3/lucee5.0.0.45
Pastebin Pastes
Pretty much the same idea as Gists, but using the Pastebin service:
Note that the full-screen "editor" mode does not support pastebin- https://trycf.com/
pastebin/{your pastebin ID here}
: Obviously, use your real Pastebin ID. This gives you the default embedded editor
Editor Keyboard Shortcuts
Within the editor you also have a couple of keyboard shortcuts:
Press CTL+S
to automatically save a Github Gist. This returns the url (including the currently selected engine
) that you could copy/paste to those you intend to share it with.
Press CTL+Enter
to automatically run the code.