On this page

An article can hold more than words. This page covers two things you can put in one: a diagram drawn from a few lines of text, and a protected picture, which only people who can read the article can open.

Use diagrams for flows, sequences and data models you want to keep up to date by editing text. Use protected pictures for anything you would not want passed around as a link: architecture drawings, database diagrams, screenshots of a customer's system.

Diagrams#

A diagram is written as Mermaid text in a code block, and DevStride draws it.

Add a diagram#

  1. In the article editor, put your cursor where the diagram belongs.
  2. Click Diagram (Mermaid) in the toolbar, beside Code Block. A small starter diagram appears:
flowchart LR
  A[Start] --> B{Decision}
  B -->|Yes| C[Done]
  B -->|No| D[Try again]
  1. Edit the text. The drawing appears right under it and is drawn again a moment after you stop typing.

A code block whose language is set to mermaid is a diagram however it got there, so text pasted from elsewhere works too.

Under the text, the editor tells you where the drawing stands:

It says Meaning
Drawing diagram… The drawing is being made.
Write a Mermaid diagram above and it is drawn here. The block is empty.
Not a diagram yet: check the Mermaid syntax above. The text is not valid Mermaid yet. Keep typing, or check it against the Mermaid documentation.
This diagram is too long to draw. The text is over 20,000 characters. Split it into two diagrams.
The diagram preview is not available right now. The drawing could not be made this time. Your text is kept.

Where readers see the drawing#

A diagram is drawn wherever the article is read:

  • in the library, for your team;
  • in Preview as customer;
  • in the customer portal, on Help center articles and on specs;
  • in a saved version in History, and in a proposed change waiting for approval.

A diagram that cannot be drawn shows its text instead, so nothing is lost. An article draws its first 30 diagrams; any after that stay as text.

A diagram is only a picture. Whatever its text says, it cannot run anything and it cannot contact another server.

Only in the Knowledge Base, and not on public documentation sites

Diagrams are drawn in Knowledge Base articles only. In an item description or a comment, the same text stays a code block. A page of a public documentation site also shows a diagram as its text, not as a drawing.

Protected pictures#

A picture you add to an article is protected by default, except in an article that belongs to a public documentation site (see the switch below). A protected picture is shown only to people who can read that article.

What protection does#

  • The picture's address shows nothing by itself. Copying it into a browser, an email or a chat gives nobody the picture.
  • Each time someone opens the article, DevStride checks that this reader may read this article and gives their browser a link to the picture that works for five minutes.
  • When a customer loses access to the article, its pictures stop opening for them; a link they were already given stops working within five minutes. The same happens when you unpublish or archive the article, or take a picture out of it: customers, and team members who only read published articles, can no longer open it. People on your team who can edit the article, or open its earlier versions, can still see the pictures it held.

This holds in the library for your team and in the customer portal for your customers: a customer sees the picture only in an article their company can read.

Adding a picture#

Paste a picture, drag one in, or click Insert image, as you always have. Protected pictures can be PNG, JPEG, GIF or WebP, up to 10 MB each.

In the editor, a protected picture carries a small lock. Hovering it says Protected: shown only to people who can read this article.

The Protect new pictures switch#

The editor's Audience panel has a Pictures setting with one switch, Protect new pictures. Under it, the editor says what the switch currently means:

  • On: New pictures are shown only to people who can read this article. They are left out of public documentation sites.
  • Off: New pictures can be opened by anyone who has their address. SVG pictures are always protected. Use this for a picture that is meant to be public. In an article that belongs to a documentation site, the sentence ends differently: SVG pictures are always protected, so they are left out of the public documentation site.

Two things to know about the switch:

  • It decides how pictures you add from now on are stored. It never changes a picture already in the article.
  • It starts on, except in an article that belongs to a public documentation site, where it starts off, because a public page leaves protected pictures out.

If you add a picture of a kind that cannot be protected, the editor says This kind of picture cannot be protected. Use a PNG, JPEG, GIF, WebP or SVG, or turn off "Protect new pictures".

A protected picture belongs to one article#

A protected picture is tied to the article it was added to, because that article decides who may see it. If you copy it into another article, it is not shown there. The editor says:

This protected picture belongs to another article, so it is not shown here. Select it and choose "Copy into this article".

Select the picture and choose Copy into this article. DevStride makes a copy that belongs to this article, so this article's readers can see it. You need to be able to open the article the picture came from. If the copy fails, the editor says The picture could not be copied into this article. or The picture could not be read. Check your connection, and that you can open the article it belongs to.

Cropping a protected picture saves the cropped copy as a protected picture of the same article, whatever the switch says.

SVG pictures#

Articles accept SVG pictures, up to 2 MB each. Two rules apply to every SVG:

  • It is always protected, whether Protect new pictures is on or off.
  • It is cleaned before anyone sees it. Scripts, links to other sites, embedded pages and anything else that could do more than draw are removed, and the result is only ever shown as a picture. A file that cannot be made safe is never shown to anyone.

Because an SVG is always protected, it is left out of a public documentation site.

What is not included#

  • Pictures already in your articles are unchanged. A picture added before protection existed, or while the switch was off, can still be opened by anyone who has its address. To protect one, remove it from the article and add it again with Protect new pictures on.
  • Public documentation sites leave protected pictures out and show diagrams as text.
  • The portal's spec editor and Reviews page. While a customer edits a draft spec in the portal, a protected picture in it does not show, and a diagram shows as its text. The same is true of the proposed text on a card of the portal's Reviews page. Both show normally on the spec's own page, where it is read rather than edited.
  • There is no organization-wide setting that forces every picture to be protected, no zoom or full-screen view for a diagram or picture, and no record of who opened a picture.
Powered by DevStride