Difference between revisions of "Mediawiki Extension DrawIO Editor"

From Micylou WIKI
Jump to navigation Jump to search
(Page creation)
 
m (Text replacement - "<!-- End of Template Infobox Generic--> " to "<!-- End of Template Infobox Generic--> [{{fullurl:{{FULLPAGENAMEE}}|action=mpdf}} Download this page as PDF]")
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''<span style="color:white; background:white">[[PageName::{{PAGENAME}}|]]</span>'''
+
<!-- Template Infobox Generic-->
<!-- Template Infobox Software -->
+
{{Template:Class-Infobox-Generic<!-- ALL MUST BE FILLED IN -->
{{Template-uk:Class-Infobox-Software
 
 
|image = <!-- If an logo is required, enter the link here -->
 
|image = <!-- If an logo is required, enter the link here -->
|Source = [[Source::DataSource]]<!-- [[Source::DataSource]], [[Source::Semantic Query]], ... -->
+
|Section = [[Section::{{PAGENAME}}]]
|Version = [[Version::MW-1.31-LTS]]<!-- [[Version::MW-1.31-LTS]] -->
+
|Source = [[Source::DataSource]] <!-- [[Source::DataSource]], [[Source::Query]] ... -->
|Language = [[Language::English]]<!-- [[Language::English]], [[Language::Français]] -->
+
|Language = [[Language::English]] <!-- [[Language::English]], [[Language::Français]], [[Language::Nederlands]] -->
|Subject = [[Subject::Mediawiki]]<!-- [[Subject::Mediawiki]], ... -->
+
|Topic = [[Topic::Mediawiki]] <!-- [[Topic::Mediawiki]], [[Subject::Microsoft]], ... -->
         |DocumentType =  [[DocumentType::Extension]]<!-- [[DocumentType::Extension]] -->
+
|SubTopic = [[SubTopic::Mediawiki Extension]] <!-- [[SubTopic::Mediawiki Extension]], [[SubTopic::Office 365]] , ... -->
|LastEditBy = [[LastEditBy::{{REVISIONUSER}}]]
+
         |DocumentType =  [[DocumentType::Documentation]] <!-- [[DocumentType::User Guide]], [[DocumentType::Procedure]], [[DocumentType::Script]], [[DocumentType::Gallery]], ...-->
|LastEdit = [[LastEdit::{{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}]]
+
|LastEditBy = [[LastEditBy::{{REVISIONUSER}}]]  
|DocumentStatus = [[DocumentStatus::Active]] <!--[[DocumentStatus::Active]]  [[DocumentStatus::Development]] [[DocumentStatus::Obsolete]] -->
+
|LastEdit = [[LastEdit::{{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}]]  
 +
|Status = [[Status::Active]] <!--[[Status::Active]]  [[Status::Development]] [[Status::Obsolete]] [[Status::Archived]] [[Status::To Delete]]-->
 +
|Access = [[Access::free]] <!--[[Access::free]] [[Access::Private]] [[Access::Subscription]] -->
 +
<!-- Template version 1.01 -->
 
}}
 
}}
<!-- End of Template Infobox Software -->
+
<!-- End of Template Infobox Generic-->
 
+
[{{fullurl:{{FULLPAGENAMEE}}|action=mpdf}} Download this page as PDF]
 
== Description ==
 
== Description ==
 
This is a MediaWiki extension that integrates the draw.io flow chart editor and allows inline editing of charts.
 
This is a MediaWiki extension that integrates the draw.io flow chart editor and allows inline editing of charts.
Line 54: Line 56:
 
When you intend to use SVG which is recommended, you might want to install Extension:NativeSvgHandler too. Also you need a browser that supports SVG.<br>
 
When you intend to use SVG which is recommended, you might want to install Extension:NativeSvgHandler too. Also you need a browser that supports SVG.<br>
 
While displaying charts may work in older browsers, especially when using PNG (SVG is default and recommended), saving charts requires a fairly recent browser.
 
While displaying charts may work in older browsers, especially when using PNG (SVG is default and recommended), saving charts requires a fairly recent browser.
 +
 +
=== Example ===
 +
{{#drawio:SampleChart|interactive}}
  
 
<br><br>[[#top|Back to top of page]] - [[English|Back to Welcome Page]] <br><br>
 
<br><br>[[#top|Back to top of page]] - [[English|Back to Welcome Page]] <br><br>
  
 
[[Category:Mediawiki]]
 
[[Category:Mediawiki]]

Latest revision as of 16:27, 14 April 2021

Source: DataSource
Language: English
Topic: Mediawiki
SubTopic: Mediawiki Extension
Last Edit By: DochyJP
LastEdit: 2021-04-14
Document type: Documentation
Status: Active
Access: free

Download this page as PDF

Description

This is a MediaWiki extension that integrates the draw.io flow chart editor and allows inline editing of charts.

The source and full documentation is available on GitHub

Installation

Download

Clone this extension from GitHub into a folder named DrawioEditor within your wiki's extensions folder:

cd <your wiki root folder>/extensions
git clone https://github.com/mgeb/mediawiki-drawio-editor DrawioEditor

Activation

Activate the plugin in LocalSettings.php

require_once "$IP/extensions/DrawioEditor/DrawioEditor.php";

Usage

Add the following to any wiki page to insert a draw.io chart:

{{#drawio:ChartName}}

Warning

Please read these warnings carefully before use:

The actual editor functionality is loaded from draw.io. This code only provides integration.
Be aware that draw.io is an online service and while this plugin integrates the editor using an iframe and communicates with it only locally in your browser (javascript postMessage), it cannot guarantee that the code loaded from draw.io will not upload any data to foreign servers. This may be a privacy concern. Read the Privacy section in the documentation on GitHub for more information. When in doubt, don't use draw.io or this module. You have been warned!
This plugin is quite new and probably still has bugs, so it may or may not work with your installation.

Features

  • draw.io chart creation and editing.
  • SVG and PNG support. The file type can be configured globally and changed on a per-image basis.
  • Inline Editing and javascript uploads on save, you never leave or reload the wiki page.
  • Image files are transparently stored in the standard wiki file store, you don't need to worry about them.
  • Versioning is provided by the file store, revert to an older version of the chart at any time.
  • Draw.io original XML data is stored within the image files, so only one file must be stored per chart.
  • Supports multiple charts per page.
  • Supports relative and fixed chart dimensions.

Requirements

When you intend to use SVG which is recommended, you might want to install Extension:NativeSvgHandler too. Also you need a browser that supports SVG.
While displaying charts may work in older browsers, especially when using PNG (SVG is default and recommended), saving charts requires a fairly recent browser.

Example



Back to top of page - Back to Welcome Page