What is a good UI to enter a list of numbers?

I'm working on a small UI to manage a few attributes to style lines in SVG sketches. One of them is stroke-dasharray.

stroke-dasharray defines the pattern of dashes and gaps used to paint a dashed line. Currently users enter the pattern as a list of numbers in a text input field, i.e. "1,4,1,2" which translates to "1 point dash, 4 points gap, 1 point dash, 2 points gap" and then repeats.

I wonder if there is a better UI solution in order to enter a list of numeric values.