plugin:svgembed
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:svgembed [2021-01-15 03:57] – [Configuration] Restless | plugin:svgembed [2023-12-06 21:25] (current) – [svgEmbed Plugin] Restless | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
- | author | + | author |
- | email : restlessmind@gmail.com | + | email : emb@pobox.com |
type : helper, syntax | type : helper, syntax | ||
- | lastupdate : 2020-10-13 | + | lastupdate : 2021-06-09 |
- | compatible : Hogfather, Greebo | + | compatible : Igor, Hogfather, Greebo, Jack Jackrum |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : svg, media, image, images, diagram, diagrams | + | tags : svg, media, image, images, diagram |
downloadurl: | downloadurl: | ||
- | bugtracker : http:// | + | bugtracker : https:// |
sourcerepo : https:// | sourcerepo : https:// | ||
donationurl: | donationurl: | ||
screenshot_img : https:// | screenshot_img : https:// | ||
+ | |||
---- | ---- | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | |||
+ | PHP 7+ and [[https:// | ||
+ | |||
+ | ==== Compatibility with Igor release candidates ==== | ||
+ | |||
+ | As of this writing (June 27, 2022), this plugin is compatible with the Igor RC2 release without changes. | ||
===== Installation ===== | ===== Installation ===== | ||
Line 30: | Line 39: | ||
Under the " | Under the " | ||
- | ^ Setting name ^ Description ^ Default value ^ | + | ^ Setting name ^ Description ^ Default value ^ |
- | | | + | | **max_svg_width** |
- | | | + | | **default_width** |
- | | **default_height** | Default fall-through height of an SVG file. | 150 | | + | | **default_height** |
- | | | + | | **default_print** |
See below for discussion about how these values interact with your SVG file for display. | See below for discussion about how these values interact with your SVG file for display. | ||
Line 67: | Line 76: | ||
* [[: | * [[: | ||
- | * [[# | + | * [[# |
* [[# | * [[# | ||
+ | * [[# | ||
=== Formatting === | === Formatting === | ||
Line 123: | Line 133: | ||
> <code - Example> | > <code - Example> | ||
{{: | {{: | ||
+ | |||
+ | |||
+ | === Printing === | ||
+ | |||
+ | Printing of individual SVG files from the page has been implemented. | ||
Line 183: | Line 198: | ||
You may set this in a couple ways: | You may set this in a couple ways: | ||
- | - You may configure this globally in the admin Configuration Settings panel under the svgEmbed plugin section. | + | - Affirmative printing: |
- | - If you do not want all SVG files to be printable, you can individually set the markup on the files to make them printable. | + | - Selective printing: |
+ | To configure the wikitext, you can include the argument '' | ||
+ | |||
+ | ^ Setting | ||
+ | | Enable | ||
+ | | Disable | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | // | ||
+ | |||
+ | - To set an SVG for printing: '' | ||
+ | - To set an SVG to suppress printing (if configured to make all SVGs printable): | ||
+ | |||
+ | Of course, these arguments can be combined with any other arguments this plugin accepts. | ||
+ | |||
+ | |||
+ | |||
+ | === Styling SVG print button === | ||
+ | |||
+ | The class for the SVG printing button is '' | ||
+ | |||
+ | <code css> | ||
+ | /* SVG printing button */ | ||
+ | .dokuwiki div.svgprintbutton_table button { | ||
+ | font-family: | ||
+ | background: transparent; | ||
+ | border-top: none; | ||
+ | border-left: | ||
+ | border-right: | ||
+ | border-bottom: | ||
+ | border-radius-bottom: | ||
+ | color: #ccc; | ||
+ | font-size: 80%; | ||
+ | padding: 3px; | ||
+ | } | ||
+ | |||
+ | .dokuwiki div.svgprintbutton_table: | ||
+ | border-left: | ||
+ | border-right: | ||
+ | border-bottom: | ||
+ | color: #f99; | ||
+ | } | ||
+ | |||
+ | .svgembed_print_border { | ||
+ | background: rgba(0, 0, 0, 0.1); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | With this code I get a small button that is dim when normal, slightly grey-pink when hovered, and while it's hovered the JavaScript for this plugin triggers the last set of rules to slightly darken the background of the SVG file to show what would be printed if the button is pressed. | ||
+ | |||
+ | ==== Export to PDF with DW2PDF ==== | ||
+ | |||
+ | Export with [[plugin: | ||
+ | |||
+ | Unfortunately, | ||
+ | |||
+ | This may not be in final form. Further testing is needed, but does not affect anything if you are not using DW2PDF. | ||
===== Development ===== | ===== Development ===== | ||
=== Change Log === | === Change Log === | ||
+ | * **2021-06-09** | ||
+ | * Added initial support for [[plugin: | ||
* **2020-06-07** | * **2020-06-07** | ||
* Made change to make compatible with Hogfather RC2. | * Made change to make compatible with Hogfather RC2. | ||
Line 206: | Line 280: | ||
* **2019-06-21** | * **2019-06-21** | ||
* Initial release | * Initial release | ||
+ | |||
+ | |||
+ | === Limitations === | ||
+ | |||
+ | SVGZ (compressed SVG) files are not supported because of the way the plugin operates. | ||
=== Known Bugs and Issues === | === Known Bugs and Issues === | ||
- | None. If you find a bug, please [[http:// | + | * Currently, SVG file positioning may be an issue with the DW2PDF integration. |
+ | |||
+ | If you find a bug, please [[https:// | ||
Line 225: | Line 306: | ||
>> < | >> < | ||
>> | >> | ||
- | >> < | + | >> < |
>>> | >>> | ||
- | >>> | + | >>> |
> < | > < | ||
>> < | >> < | ||
Line 233: | Line 314: | ||
>> < | >> < | ||
>> | >> | ||
- | >> | + | >> |
>> | >> | ||
>> < | >> < | ||
>> | >> | ||
- | >> | + | >> |
plugin/svgembed.1610679424.txt.gz · Last modified: 2021-01-15 03:57 by Restless