====== Wiki-Style Script ====== ---- plugin ---- description: If there are wiki syntax of bold, italic, underlined, or monospaced text remaining (such as those in headers and link texts), this plugin will apply them. You can also change color of characters in headers and link texts. Characters of nowiki syntax won't be changed. author : Hir/wataame (main development) and HokkaidoPerson (adjustment and distribution) email : dosankomali@yahoo.co.jp type : Syntax lastupdate : 2019-01-28 compatible : Greebo, 2018-04-22 depends : conflicts : similar : header2, header3 tags : headings, headers, syntax, color, style downloadurl: https://github.com/hokkaidoperson/DokuWiki-WikiFormatStyling-Plugin/archive/master.zip bugtracker : https://github.com/hokkaidoperson/DokuWiki-WikiFormatStyling-Plugin/issues sourcerepo : https://github.com/hokkaidoperson/DokuWiki-WikiFormatStyling-Plugin donationurl: screenshot_img : ---- :!: [[ja:plugin:wikiformatstyling|このページを日本語でご覧頂けます。(Japanese version of this page available)]] ===== Summary ===== We made this plugin to enable styling headers by wiki syntax (bold, italic, underlined, monospaced, and colored text). Currently wiki syntax in headers is not allowed ([[faq:headerlinks|See this faq]]). This plugin will solve this inconvenience a little. You can also use the syntax in link texts. The script won't run if the URL includes "do=admin". ===== Installation ===== Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. ===== Examples/Usage ===== Write like this: ==== **Styling** //headers// ''is'' __fun!__ ==== === $[hdcolor $\red$\$]You can$[/hdcolor$] $[hdcolor $\#800000$\$]color texts!$[/hdcolor$] === [[pagename|**You can** //also// __style__ link texts!!]] ===== Syntax ===== In headers and link texts (and maybe somewhere else): **Bold** //Italic// __Underlined__ ''Monospaced'' (same to default DokuWiki syntax) $[hdcolor $\HTML color code$\$]Coloring texts$[/hdcolor$] ''%%\//%%'' will be ''%%//%%''.\\ ''%%://%%'' won't be converted. ===== Development ===== === Change Log === * **2018-10-09** * Initial release * **2019-01-13** * The script.js was updated to 2.1. Fixed known bugs, and extended the scope and out-of-range of the script. * **2019-01-28** * The script.js was updated to 2.2. Fixed known bugs. From this version, the script won't run if the URL includes "do=admin". === Known Bugs and Issues === - The syntax documentation includes an example under "Windows shares" that breaks if this plugin is enabled. The example includes a comment with a double asterisk that turns on bold and ends with a null string that is interpreted as TT text. These changes persist to the end of the document. - Admin > Access Control List Manager fails. The page layout is wrong, and any attempt to examine the ACL for a particular item/user results in a message "CRSF Attack" and no modifications can be made. - Thanks for your report. I'll update the plugin. Please wait a moment until the problems are fixed. --- [[user>hokkaidoperson|hokkaidoperson]] //2019-01-24 15:35// - I've updated the plugin. Does it work well now? --- [[user>hokkaidoperson|hokkaidoperson]] //2019-01-28 08:49// - Display of syntax documentation is correct. ACLs now work, but the layout sometimes changes unexpectedly after a new ACE is added. The main thing is that it is usable now, thankyou. --- [[user>MartinR|MartinR]] //2019-01-29 10:57// === ToDo/Wish List === Currently none ===== Staff ===== * Main development (development of script.js): Hir/wataame ([[https://twitter.com/Hir_gca|Twitter]]) * Adjustment and distribution (adding the other files): HokkaidoPerson ([[https://twitter.com/YukkuriDosanko|Twitter]], ) ===== Discussion ===== There is a problem when this plugin is used: lists of URLs are corrupted. See [[https://forum.dokuwiki.org/post/64204;nocount]] for my first report of this. In essence the plugin converts ''%%http://%%'' to ''%%http:%%'' or the closing form. > Thank you for your report. I'll investigate the issue and attempt to fix it. --- [[user>hokkaidoperson|hokkaidoperson]] //2019-01-08 15:07// >>I tried copying pcnt.php to http.php and editing the latter. I changed the class name accordingly but had no success in getting it to recognise 'https?:' for the start and '\s' for the end of a URL. --- [[user>MartinR|MartinR]] //2019-01-09 09:54// >>>My co-worker is now recreating the script, and I heard that his work had been going smoothly so far. Please wait until he finishes the work. I wish I could help him… (I'm not used to Javascript) --- [[user>hokkaidoperson|hokkaidoperson]] //2019-01-10 06:38// >>>I've updated the plugin. --- [[user>hokkaidoperson|hokkaidoperson]] //2019-01-13 11:17// >>>>Thanks to you both, my usage case works fine now. --- [[user>MartinR|MartinR]] //2019-01-16 22:28// \\ \\ Similar to the above, I have found that using this plugin makes footnote syntax stop working; the double underscore in footnote anchors get converted to ''%%%%''. --- [[user>ThomasMcA|ThomasMcA]] //2019-10-26 14:31//\\ This does not work in Greebo in Win10. Your sample code gets rendered thusly:\\ **Styling** //headers// ''is'' __fun!__ When I test it with this:\\ ==== $[hdcolor $\yellow$\$]XXXXXXXXXXXXX $[/hdcolor$]==== It looks like this:\\ $[hdcolor $\yellow$\$]XXXXXXXXXXXXX $[/hdcolor$] On a Linux host running Greebo, the above test gets correctly rendered.