In Insanity, I copied the code from nXIII's awesome Scratch add-ons. However, I recommend against just importing that file completely, as it may conflict with stuff already in your mod. What I did is I selectively fileIn'd the code that was related to the multiline input.
Professional full stack web developer who first learned programming in Scratch
Administrator and lead engineer on the Scratch Wiki