Community docs

Embedding resources with the Simple Editor

With data.world's Simple Editor you can quickly and easily add different kinds of files from various sources into project and dataset summaries, posts, and insights. The articles Intro to the Simple Data Documentation Editor and Using the Simple Editor command menu describe the editor and the features of the command menu.

Using drag and drop to embed resources

In addition to using the command menu, you can also embed resources into a Simple Editor window with drag and drop. Drag and drop works with resources located in the current project or dataset, on your local drive, a networked or cloud drive, and a web page. To embed a resource by dragging and dropping it the resource needs to be dragged to the beginning of a new line in the Simple Editor window. Resources placed in-line render as links rather

Various sources for embedded resources

The command menu is useful for embedding resources from the current dataset or project into the editor window, but resources in connected datasets or located outside of data.world must be embedded with drag and drop. Sources for resources that can be embedded include:

  • The current project or dataset

  • Desktop or cloud storage

  • From a URL

The current project or dataset

While recently modified files in the current project will show up in the command menu, files in linked datasets do not. Drag and drop works for both the current project or dataset files and also for the connected dataset files. To include any resource from the left sidebar of the workspace select it and drag it to the beginning of a new line in the editor window:

Screen_Shot_2019-05-07_at_11.38.41_AM.png

The files in your project or dataset that can be viewed in the workspace typically render in full or as a preview in the Simple Editor window. PDF's are the current exception to this rule and can only be embedded as a link. Tabular files are displayed as a preview with a link to the full file. Text files (.txt, not rich-text files--.rtf) and most image files are also previewed in the editor. See the article Supported file types for detailed information on the rendering of specific file types.

Queries and insights are both rendered as previews in the Simple Editor. Notice that for queries there is also an option to run the query in the bottom right corner of the window:

Screen_Shot_2019-03-29_at_3.20.56_PM.png

If you select the Run query option you'll be taken to a new tab in the workspace which will display the full results of the query (or the maximum number allowed for larger tables):

Screen_Shot_2019-03-29_at_3.24.56_PM.png

To get back to the summary window click on its tab at the top of the workspace:

Screen_Shot_2019-03-29_at_3.37.07_PM.png

Parameterized queries can also be embedded into the Simple Editor where they will be executable by the reader. The query is previewed in the editor window with all the parameter fields showing the default values. The reader can replace the defaults with other values and interactively run the query without ever leaving the summary, post, or insight. Running the query returns a preview of the first five rows of the query results. Clicking See all runs the query in a workspace and returns all the results from the parameters set by the reader (up to 10,000):

Screen_Shot_2019-05-06_at_12.49.37_PM.png

Embedding files from your desktop or a cloud storage device like iCloud, Dropbox, or Box is easy with the editor's drag and drop interface. Simply choose the file and drag it to the beginning of a line in the Simple Editor window. Non-image files will be added to the dataset or project:

drag_add__file.jpg

You will then need to embed the uploaded file into the editor window either with the command menu or by dragging and dropping it. If the file you choose is a supported image file, the image will be added to the editor window without being added to the dataset or project as a new file:

From a URL

Another source for embeddable content is a webpage. URL's can be embedded into the beginning of a line in a Simple Editor window and they will show up as either a preview of the webpage or as a link to it, depending on how the source page was configured by its author:

Screen_Shot_2019-05-06_at_1.42.33_PM.png

Embedding resources vs. linking resources

With the Simple Editor you have the choice of either embedding content directly into an editor window or linking to it. As we have seen, embedding content is done by dragging a resource to a new line in the editor window and dropping it into place. If, instead of dropping a resource at the beginning of a new line, you insert it in-line, a link to the resource will be created.

In each of the examples below a resource is shown linked on the top line of the summary and then embedded below the link:

Parameterized query link and embed
Screen_Shot_2019-05-06_at_2.13.34_PM.png
Image link and embed
Screen_Shot_2019-05-06_at_2.23.55_PM.png