MediaWiki/Extension/DrawioEditor

Aus Foxwiki

topic - Kurzbeschreibung

Beschreibung

{{#drawio:DrawioEditor1|width=400px}}


Add a chart

  1. Add the following tag to any wiki page to insert a draw.io chart: {{#drawio:ChartName}} ChartName must be unique and will be used as the basename for the backing file.
  2. Save the wiki page.
  3. Since no chart exists at this point, a placeholder will be shown where you've put the drawio tag. Click on the Edit link at the top right of it.
  4. Draw your chart, click Save to save and Exit to leave Edit mode.

Edit a chart

</translate> Each chart will have an Edit link at its top right. Click it to get back into the editor. Click Save to save and Exit to get out of the editor. If a wiki page has multiple charts, only one can be edited at the same time.

<translate>

View or revert to old versions

</translate> On each save, a new version of the backing file will be added to the wiki file store. You can get there by clicking the chart while you're not editing. There you can look at and revert to old versions like with any file uploaded to the wiki.

<translate>

Options

</translate> Options are appended to the tag separated by |. For example:

{{#drawio:ChartName|max-width=500px}}

<translate>

Chart dimensions

</translate> While the defaults are good under most circumstances, it may be necessary to control how your chart is displayed. The following options can be used for that:

  • width: Sets the chart width. Defaults to 100%.
  • max-width: Set the maximum chart width if width is relative. Defaults to chart.
  • height: Sets the chart height. Defaults to auto. Usually not used.

These option take any absolute CSS length value as argument, for example:

  • 400px
  • 80%
  • auto

The keyword chart has a special meaning and stands for the actual size of the chart. When the chart is saved, the image dimensions are automatically adjusted. Usually it's preferable to use chart instead of a fixed pixel value.

The default behaviour is the let the chart scale (width=100% and height=auto) until it reaches its actual width stored in the chart (max-width=chart).

If you want it to scale further or less, you can adjust max_width manually. Use none to allow infinite scaling.

If you just want a fixed width, set width to chart or some fixed CSS value and leave height on auto. Unless you need a fixed sized image area before the image is actually loaded or really need to scale based on height, there is usually no point in setting height. If you set it you probably should set width to auto, or when setting both use chart so you don't need to update the values manually every time your image changes. Examples

  • Let the chart scale until it reaches its actual width (default):
{{#drawio:ChartName}}

Same as:

{{#drawio:ChartName|width=100%|max-width=chart|height=auto}}
  • Let the chart scale until it's 800 px wide:
{{#drawio:ChartName|max-width=800px}}
  • Let the chart scale infinitely:
{{#drawio:ChartName|max-width=none}}
  • Fixed width:
{{#drawio:ChartName|width=600px}}
  • Fixed width using the actual chart width:
{{#drawio:ChartName|width=chart}}
  • Fixed height and width using the actual chart dimensions:
{{#drawio:ChartName|width=chart|height=chart}}

<translate>



Anhang

Siehe auch

Sicherheit

Dokumentation

Links

Projekt
  1. https://www.drawio.com/
  2. https://github.com/jgraph
Weblinks