There are a few components that build URLs within the editor. This should be moved to a central place so that it is not duplicated. The documents dropdown and the languages dropdown are examples, but there may be more.
This could be implemented as a utility function or a component. A connected component may be appropriate since it should use the current workspace state (project and version slug, document, language) and just modify one or more pieces of state that would update.