Support insertAt option to addLineWidget

Issue #1627