Copy & Paste JavaScript into FileMaker

How to easily copy JavaScript & HTML code into FileMaker

Here’s a nice trick I learned from Chris Irvine ( on how to quickly copy HTML and Javascript code into your FileMaker scripts.

Copy and paste both HTML and JavaScript code into FileMaker

To copy HTML and Javascript code into my FileMaker databases, I used to use a text editor to escape all double quotes (") by prepending them with a backslash (\"). Not doing that will cause an error message to pop up because FileMaker thinks that I’m using double quotes to add a text string ("id="123"" should be "id=\"123\"")). While a code editor’s replace all function is useful, it gets very annoying after a few iterations in my JavaScript code.

Example of escaped double quotes

Doing that every time in my code editor is a major pain, and thankfully there’s a way around that!

Insert Text []:

You can copy and paste text into the Insert Text script step without having to escape double quotes or surrounding the code with double quotes.

Just copy and paste your code

You can choose to set a variable or a field with that text.

Either way, this makes my development flow much more efficient, and it’s an easy way to copy and paste HTML or JavaScript code into your FileMaker solution.