Method A: 1. Include a list of all page slugs in a JS constant 2. Port slugify to JS 3. Write a custom CodeMirror plugin which shows a list of matches and picks one when you press Enter Method B: 1. Write a JSON endpoint to return a list of page slug matches for a given string 2. Write a custom CodeMirror plugin which shows a list of matches and picks one when you press Enter