Back to Directus

Visual Editor

content/guides/02.content/8.visual-editor/0.index.md

latest2.0 KB
Original Source
<div style="padding:56.33% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/1068823628?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Directus-Visual-Editor-Preview"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>

Making use of the visual editor requires some effort on the part of web developers through two separate but related aspects. These are the Frontend Library, and the Studio Module built into Directus.

The library sets up the connection between your website and your Directus instance. The studio module is then used to render your website within the Directus Studio, make changes in place, and then render those changes as they are made.

The visual editor behaves similarly to Live Preview in that it renders content in an iFrame, but with a few important differences.

:::collapsible{ name="differences" class="mt-2"}

Live PreviewVisual Editor
Entry PointItem FormWebsite rendered in Visual Editor module
MotivationUsers want to view unpublished dataUsers want to edit elements on their website directly in place and see changes immediately
ScopeLimited to editing/viewing a single item of a collection at a timeUsers can navigate through the website freely and edit any linked item on a page without navigating to the applicable collection
SetupWeb developers need to implement a preview on their website to ensure that unpublished can be safely viewedWeb developers need to use the Visual Editing library to connect to the visual editor and set the data-directus attribute on the elements they want to be editable
:::