Edit on your live page (visual editor)
The visual editor lets you open your own page and click the text you want to change. You then type the better translation next to it.
Status. The editor is built and tested, but it is off by default and it is not connected end to end yet. Several steps below are OPEN.
How it is meant to work#
- On the site page choose Preview and edit, or use the preview link in the translation editor. It opens
/preview/for your site. See Preview before you publish. - Your own page opens in a frame, or in a new window if your page forbids frames. The page address ends in
#rl-preview. - A toolbar appears: "Preview – not published". Switch on Edit mode, then click a string.
- Type your translation. Choose Preview to see it in place, Save draft to keep it, or Undo.
A saved edit is a Manual draft. Nothing is published from the visual editor. Publishing stays in the dashboard. See Publish changes.
Keyboard#
Alt+Shift+P moves to the toolbar. The keys ] and [ step to the next and the previous string. Escape ends edit mode.
What keeps it safe#
- It starts only when the address has the marker and your signed files list the dashboard as an allowed origin.
- It talks only to the dashboard origins in that list, and it keeps nothing in the browser.
- The page being edited must be on one of your site's allowed origins.
- The dashboard accepts only the string key from the page. The text and the state come from the dashboard.
What is not finished#
- Your signed files must list the dashboard origin in a field called
previewOrigins. The shared file format has the field now, but the publisher, the plugins and the loader do not use it yet: OPEN. - The editor script has to be added to your page by the plugin or by you. How it is delivered is OPEN.
- The editor works on the original-language page. When it edits a right-to-left language, tags and placeholders are shown as buttons and a live check, so they cannot get scrambled.
- The editor works on the original-language page. If a visitor language is already applied, the dashboard tells you to switch the page back first.
- Text that JavaScript adds after the scan is not editable until you reload the page.
- Following a link inside the preview ends the preview.
- Browsers other than Chrome have not been tested: verify.