plugin:svgembed
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
plugin:svgembed [2021-01-15 03:57] – [Configuration] Restless | plugin:svgembed [2021-07-13 16:57] – [Development] Restless | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : restlessmind@gmail.com | email : restlessmind@gmail.com | ||
type : helper, syntax | type : helper, syntax | ||
- | lastupdate : 2020-10-13 | + | lastupdate : 2021-06-09 |
compatible : Hogfather, Greebo | compatible : Hogfather, Greebo | ||
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: | ||
Line 20: | Line 20: | ||
screenshot_img : https:// | screenshot_img : https:// | ||
---- | ---- | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | |||
+ | PHP 7+ and [[https:// | ||
===== Installation ===== | ===== Installation ===== | ||
Line 69: | Line 73: | ||
* [[# | * [[# | ||
* [[# | * [[# | ||
+ | * [[# | ||
=== Formatting === | === Formatting === | ||
Line 123: | Line 128: | ||
> <code - Example> | > <code - Example> | ||
{{: | {{: | ||
+ | |||
+ | |||
+ | === Printing === | ||
+ | |||
+ | Printing of individual SVG files from the page has been implemented. | ||
Line 183: | Line 193: | ||
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 275: | ||
* **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 [[http:// | ||
plugin/svgembed.txt · Last modified: 2023-12-06 21:25 by Restless