Allow for a more flexible Editor User Interface

A suggestion from @Enrique is to get inspiration from the approach that Streamlit takes with “elements”:

The flexibility, however, should not come at the cost of performance, according to @Johan_Tuls .