├── .github └── workflows │ └── phpTestLinux.yml ├── COPYING ├── README ├── _test ├── GeneralTest.php └── SyntaxTest.php ├── action.php ├── all.less ├── conf ├── default.php ├── lang2dir.conf └── metadata.php ├── example.txt ├── helper.php ├── images ├── README ├── note │ ├── 16 │ │ ├── alert.png │ │ ├── download.png │ │ ├── help.png │ │ ├── important.png │ │ ├── info.png │ │ ├── tip.png │ │ └── todo.png │ └── 48 │ │ ├── alert.png │ │ ├── download.png │ │ ├── help.png │ │ ├── important.png │ │ ├── info.png │ │ ├── tip.png │ │ └── todo.png └── toolbar │ ├── box.png │ ├── clear.png │ ├── column.png │ ├── em.png │ ├── hi.png │ ├── lo.png │ └── picker.png ├── lang ├── ar │ ├── lang.php │ └── settings.php ├── bg │ ├── lang.php │ └── settings.php ├── bn │ ├── lang.php │ └── settings.php ├── ckb │ ├── lang.php │ └── settings.php ├── cs │ ├── lang.php │ └── settings.php ├── cy │ ├── lang.php │ └── settings.php ├── da │ ├── lang.php │ └── settings.php ├── de-informal │ ├── lang.php │ └── settings.php ├── de │ ├── lang.php │ └── settings.php ├── el │ ├── lang.php │ └── settings.php ├── en │ ├── lang.php │ └── settings.php ├── eo │ ├── lang.php │ └── settings.php ├── es │ ├── lang.php │ └── settings.php ├── fa │ ├── lang.php │ └── settings.php ├── fr │ ├── lang.php │ └── settings.php ├── hr │ ├── lang.php │ └── settings.php ├── hu │ ├── lang.php │ └── settings.php ├── it │ ├── lang.php │ └── settings.php ├── ja │ ├── lang.php │ └── settings.php ├── ko │ ├── lang.php │ └── settings.php ├── nl │ ├── lang.php │ └── settings.php ├── no │ ├── lang.php │ └── settings.php ├── pl │ ├── lang.php │ └── settings.php ├── pt-br │ ├── lang.php │ └── settings.php ├── pt │ ├── lang.php │ └── settings.php ├── ru │ ├── lang.php │ └── settings.php ├── sk │ ├── lang.php │ └── settings.php ├── sr │ ├── lang.php │ └── settings.php ├── sv │ ├── lang.php │ └── settings.php ├── tr │ ├── lang.php │ └── settings.php ├── uk │ ├── lang.php │ └── settings.php ├── vi │ ├── lang.php │ └── settings.php ├── zh-tw │ ├── lang.php │ └── settings.php └── zh │ ├── lang.php │ └── settings.php ├── pdf.less ├── plugin.info.txt ├── print.less ├── print_or_pdf.less ├── style.less └── syntax ├── closesection.php ├── div.php ├── divblock.php ├── divwrap.php ├── span.php ├── spaninline.php └── spanwrap.php /.github/workflows/phpTestLinux.yml: -------------------------------------------------------------------------------- 1 | name: PHP Tests on Linux 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | testLinux: 7 | name: PHP ${{ matrix.php-versions }} DokuWiki ${{ matrix.dokuwiki-branch }} 8 | runs-on: ubuntu-latest 9 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 10 | 11 | strategy: 12 | matrix: 13 | php-versions: ['7.2', '7.3', '7.4', '8.0'] 14 | dokuwiki-branch: [ 'master', 'stable'] 15 | exclude: 16 | - dokuwiki-branch: 'stable' 17 | php-versions: '8.0' 18 | fail-fast: false 19 | 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v2 23 | 24 | - name: Setup PHP 25 | uses: shivammathur/setup-php@v2 26 | with: 27 | php-version: ${{ matrix.php-versions }} 28 | extensions: mbstring, intl, PDO, pdo_sqlite, bz2 29 | 30 | - name: Setup problem matchers 31 | run: | 32 | echo ::add-matcher::${{ runner.tool_cache }}/php.json 33 | echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json 34 | 35 | - name: Download DokuWiki Test-setup 36 | run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh 37 | 38 | - name: Run DokuWiki Test-setup 39 | env: 40 | CI_SERVER: 1 41 | DOKUWIKI: ${{ matrix.dokuwiki-branch }} 42 | run: sh travis.sh 43 | 44 | - name: Setup PHPUnit 45 | run: | 46 | php _test/fetchphpunit.php 47 | cd _test 48 | 49 | - name: Run PHPUnit 50 | run: | 51 | cd _test 52 | php phpunit.phar --verbose --stderr --group plugin_wrap 53 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License 307 | along with this program; if not, write to the Free Software 308 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 309 | 310 | 311 | Also add information on how to contact you by electronic and paper mail. 312 | 313 | If the program is interactive, make it output a short notice like this 314 | when it starts in an interactive mode: 315 | 316 | Gnomovision version 69, Copyright (C) year name of author 317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 318 | This is free software, and you are welcome to redistribute it 319 | under certain conditions; type `show c' for details. 320 | 321 | The hypothetical commands `show w' and `show c' should show the appropriate 322 | parts of the General Public License. Of course, the commands you use may 323 | be called something other than `show w' and `show c'; they could even be 324 | mouse-clicks or menu items--whatever suits your program. 325 | 326 | You should also get your employer (if you work as a programmer) or your 327 | school, if any, to sign a "copyright disclaimer" for the program, if 328 | necessary. Here is a sample; alter the names: 329 | 330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 331 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 332 | 333 | , 1 April 1989 334 | Ty Coon, President of Vice 335 | 336 | This General Public License does not permit incorporating your program into 337 | proprietary programs. If your program is a subroutine library, you may 338 | consider it more useful to permit linking proprietary applications with the 339 | library. If this is what you want to do, use the GNU Library General 340 | Public License instead of this License. 341 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | see plugin.info.txt -------------------------------------------------------------------------------- /_test/GeneralTest.php: -------------------------------------------------------------------------------- 1 | assertFileExists($file); 23 | 24 | $info = confToHash($file); 25 | 26 | $this->assertArrayHasKey('base', $info); 27 | $this->assertArrayHasKey('author', $info); 28 | $this->assertArrayHasKey('email', $info); 29 | $this->assertArrayHasKey('date', $info); 30 | $this->assertArrayHasKey('name', $info); 31 | $this->assertArrayHasKey('desc', $info); 32 | $this->assertArrayHasKey('url', $info); 33 | 34 | $this->assertEquals('wrap', $info['base']); 35 | $this->assertRegExp('/^https?:\/\//', $info['url']); 36 | $this->assertTrue(mail_isvalid($info['email'])); 37 | $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); 38 | $this->assertTrue(false !== strtotime($info['date'])); 39 | } 40 | 41 | /** 42 | * Test to ensure that every conf['...'] entry in conf/default.php has a corresponding meta['...'] entry in 43 | * conf/metadata.php. 44 | */ 45 | public function testPluginConf(): void 46 | { 47 | $conf_file = __DIR__ . '/../conf/default.php'; 48 | $meta_file = __DIR__ . '/../conf/metadata.php'; 49 | 50 | if (!file_exists($conf_file) && !file_exists($meta_file)) { 51 | self::markTestSkipped('No config files exist -> skipping test'); 52 | } 53 | 54 | if (file_exists($conf_file)) { 55 | include($conf_file); 56 | } 57 | if (file_exists($meta_file)) { 58 | include($meta_file); 59 | } 60 | 61 | $this->assertEquals( 62 | gettype($conf), 63 | gettype($meta), 64 | 'Both ' . DOKU_PLUGIN . 'wrap/conf/default.php and ' . DOKU_PLUGIN . 'wrap/conf/metadata.php have to exist and contain the same keys.' 65 | ); 66 | 67 | if ($conf !== null && $meta !== null) { 68 | foreach ($conf as $key => $value) { 69 | $this->assertArrayHasKey( 70 | $key, 71 | $meta, 72 | 'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'wrap/conf/metadata.php' 73 | ); 74 | } 75 | 76 | foreach ($meta as $key => $value) { 77 | $this->assertArrayHasKey( 78 | $key, 79 | $conf, 80 | 'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'wrap/conf/default.php' 81 | ); 82 | } 83 | } 84 | 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /_test/SyntaxTest.php: -------------------------------------------------------------------------------- 1 | \n==== Heading ====\n\nSome text\n"); 19 | $expected = 20 | [ 21 | [ 22 | 'document_start', 23 | [], 24 | 0 25 | ], 26 | [ 27 | 'plugin', 28 | [ 29 | 'wrap_divwrap', 30 | [ 31 | DOKU_LEXER_ENTER, 32 | '' 36 | ], 37 | 1 38 | ], 39 | [ 40 | 'header', 41 | [ 42 | 'Heading', 43 | 3, 44 | 8 45 | ], 46 | 8 47 | ], 48 | [ 49 | 'plugin', 50 | [ 51 | 'wrap_closesection', 52 | [], 53 | DOKU_LEXER_SPECIAL, 54 | false 55 | ], 56 | 8 57 | ], 58 | [ 59 | 'p_open', 60 | [], 61 | 8 62 | ], 63 | [ 64 | 'cdata', 65 | [ 66 | 'Some text' 67 | ], 68 | 27 69 | ], 70 | [ 71 | 'p_close', 72 | [], 73 | 37 74 | ], 75 | [ 76 | 'plugin', 77 | [ 78 | 'wrap_divwrap', 79 | [ 80 | DOKU_LEXER_EXIT, 81 | '' 82 | ], 83 | DOKU_LEXER_EXIT, 84 | '' 85 | ], 86 | 37 87 | ], 88 | [ 89 | 'document_end', 90 | [], 91 | 37 92 | ] 93 | ]; 94 | $this->assertEquals($expected, $instructions); 95 | } 96 | 97 | public function testBlockNesting() { 98 | $instructions = p_get_instructions("\nFoo\n\n Bar\n"); 99 | $expected = 100 | [ 101 | [ 102 | 'document_start', 103 | [], 104 | 0 105 | ], 106 | [ 107 | 'plugin', 108 | [ 109 | 'wrap_divwrap', 110 | [ 111 | DOKU_LEXER_ENTER, 112 | '' 116 | ], 117 | 1 118 | ], 119 | [ 120 | 'p_open', 121 | [ 122 | ], 123 | 1 124 | ], 125 | [ 126 | 'cdata', 127 | [ 128 | 'Foo' 129 | ], 130 | 8 131 | ], 132 | [ 133 | 'p_close', 134 | [], 135 | 11 136 | ], 137 | [ 138 | 'p_open', 139 | [ 140 | ], 141 | 11 142 | ], 143 | [ 144 | 'cdata', 145 | [ 146 | ' Bar' 147 | ], 148 | 13 149 | ], 150 | [ 151 | 'p_close', 152 | [], 153 | 33 154 | ], 155 | [ 156 | 'plugin', 157 | [ 158 | 'wrap_divwrap', 159 | [ 160 | DOKU_LEXER_EXIT, 161 | '' 162 | ], 163 | DOKU_LEXER_EXIT, 164 | '' 165 | ], 166 | 33 167 | ], 168 | [ 169 | 'document_end', 170 | [], 171 | 33 172 | ] 173 | ]; 174 | $this->assertEquals($expected, $instructions); 175 | } 176 | 177 | public function testInlineNesting() { 178 | $instructions = p_get_instructions("Foo Bar"); 179 | $expected = 180 | [ 181 | [ 182 | 'document_start', 183 | [], 184 | 0 185 | ], 186 | [ 187 | 'p_open', 188 | [ 189 | ], 190 | 0 191 | ], 192 | [ 193 | 'plugin', 194 | [ 195 | 'wrap_spanwrap', 196 | [ 197 | DOKU_LEXER_ENTER, 198 | '' 202 | ], 203 | 1 204 | ], 205 | [ 206 | 'cdata', 207 | [ 208 | 'Foo Bar' 209 | ], 210 | 7 211 | ], 212 | [ 213 | 'plugin', 214 | [ 215 | 'wrap_spanwrap', 216 | [ 217 | DOKU_LEXER_EXIT, 218 | '' 219 | ], 220 | DOKU_LEXER_EXIT, 221 | '' 222 | ], 223 | 32 224 | ], 225 | [ 226 | 'cdata', 227 | [ 228 | '' 229 | ], 230 | 39 231 | ], 232 | [ 233 | 'p_close', 234 | [], 235 | 39 236 | ], 237 | [ 238 | 'document_end', 239 | [], 240 | 39 241 | ] 242 | ]; 243 | $this->assertEquals($expected, $instructions); 244 | } 245 | 246 | } 247 | -------------------------------------------------------------------------------- /action.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | class action_plugin_wrap extends DokuWiki_Action_Plugin { 10 | 11 | /** 12 | * register the eventhandlers 13 | * 14 | * @author Andreas Gohr 15 | */ 16 | function register(Doku_Event_Handler $controller){ 17 | $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array ()); 18 | $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'handle_secedit_button'); 19 | } 20 | 21 | function handle_toolbar(Doku_Event $event, $param) { 22 | $syntaxDiv = $this->getConf('syntaxDiv'); 23 | $syntaxSpan = $this->getConf('syntaxSpan'); 24 | 25 | $event->data[] = array ( 26 | 'type' => 'picker', 27 | 'title' => $this->getLang('picker'), 28 | 'icon' => '../../plugins/wrap/images/toolbar/picker.png', 29 | 'list' => array( 30 | array( 31 | 'type' => 'format', 32 | 'title' => $this->getLang('column'), 33 | 'icon' => '../../plugins/wrap/images/toolbar/column.png', 34 | 'open' => '<'.$syntaxDiv.' group>\n<'.$syntaxDiv.' half column>\n', 35 | 'close' => '\n\n\n<'.$syntaxDiv.' half column>\n\n\n\n', 36 | ), 37 | array( 38 | 'type' => 'format', 39 | 'title' => $this->getLang('box'), 40 | 'icon' => '../../plugins/wrap/images/toolbar/box.png', 41 | 'open' => '<'.$syntaxDiv.' center round box 60%>\n', 42 | 'close' => '\n\n', 43 | ), 44 | array( 45 | 'type' => 'format', 46 | 'title' => $this->getLang('info'), 47 | 'icon' => '../../plugins/wrap/images/note/16/info.png', 48 | 'open' => '<'.$syntaxDiv.' center round info 60%>\n', 49 | 'close' => '\n\n', 50 | ), 51 | array( 52 | 'type' => 'format', 53 | 'title' => $this->getLang('tip'), 54 | 'icon' => '../../plugins/wrap/images/note/16/tip.png', 55 | 'open' => '<'.$syntaxDiv.' center round tip 60%>\n', 56 | 'close' => '\n\n', 57 | ), 58 | array( 59 | 'type' => 'format', 60 | 'title' => $this->getLang('important'), 61 | 'icon' => '../../plugins/wrap/images/note/16/important.png', 62 | 'open' => '<'.$syntaxDiv.' center round important 60%>\n', 63 | 'close' => '\n\n', 64 | ), 65 | array( 66 | 'type' => 'format', 67 | 'title' => $this->getLang('alert'), 68 | 'icon' => '../../plugins/wrap/images/note/16/alert.png', 69 | 'open' => '<'.$syntaxDiv.' center round alert 60%>\n', 70 | 'close' => '\n\n', 71 | ), 72 | array( 73 | 'type' => 'format', 74 | 'title' => $this->getLang('help'), 75 | 'icon' => '../../plugins/wrap/images/note/16/help.png', 76 | 'open' => '<'.$syntaxDiv.' center round help 60%>\n', 77 | 'close' => '\n\n', 78 | ), 79 | array( 80 | 'type' => 'format', 81 | 'title' => $this->getLang('download'), 82 | 'icon' => '../../plugins/wrap/images/note/16/download.png', 83 | 'open' => '<'.$syntaxDiv.' center round download 60%>\n', 84 | 'close' => '\n\n', 85 | ), 86 | array( 87 | 'type' => 'format', 88 | 'title' => $this->getLang('todo'), 89 | 'icon' => '../../plugins/wrap/images/note/16/todo.png', 90 | 'open' => '<'.$syntaxDiv.' center round todo 60%>\n', 91 | 'close' => '\n\n', 92 | ), 93 | array( 94 | 'type' => 'insert', 95 | 'title' => $this->getLang('clear'), 96 | 'icon' => '../../plugins/wrap/images/toolbar/clear.png', 97 | 'insert' => '<'.$syntaxDiv.' clear/>\n', 98 | ), 99 | array( 100 | 'type' => 'format', 101 | 'title' => $this->getLang('em'), 102 | 'icon' => '../../plugins/wrap/images/toolbar/em.png', 103 | 'open' => '<'.$syntaxSpan.' em>', 104 | 'close' => '', 105 | ), 106 | array( 107 | 'type' => 'format', 108 | 'title' => $this->getLang('hi'), 109 | 'icon' => '../../plugins/wrap/images/toolbar/hi.png', 110 | 'open' => '<'.$syntaxSpan.' hi>', 111 | 'close' => '', 112 | ), 113 | array( 114 | 'type' => 'format', 115 | 'title' => $this->getLang('lo'), 116 | 'icon' => '../../plugins/wrap/images/toolbar/lo.png', 117 | 'open' => '<'.$syntaxSpan.' lo>', 118 | 'close' => '', 119 | ), 120 | ) 121 | ); 122 | } 123 | 124 | /** 125 | * Handle section edit buttons, prevents section buttons inside the wrap plugin from being rendered 126 | * 127 | * @param Doku_Event $event The event object 128 | * @param array $param Parameters for the event 129 | */ 130 | public function handle_secedit_button(Doku_Event $event, $param) { 131 | // counter of the number of currently opened wraps 132 | static $wraps = 0; 133 | $data = $event->data; 134 | 135 | if ($data['target'] == 'plugin_wrap_start') { 136 | ++$wraps; 137 | } elseif ($data['target'] == 'plugin_wrap_end') { 138 | --$wraps; 139 | } elseif ($wraps > 0 && $data['target'] == 'section') { 140 | $event->preventDefault(); 141 | $event->stopPropagation(); 142 | $event->result = ''; 143 | } 144 | } 145 | } 146 | 147 | -------------------------------------------------------------------------------- /all.less: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | Screen and Print Styles for the Wrap Plugin 3 | ********************************************************************/ 4 | 5 | .dokuwiki { 6 | 7 | /* resetting the box model to something more sane makes life a whole lot easier */ 8 | .plugin_wrap { 9 | -moz-box-sizing: border-box; 10 | -webkit-box-sizing: border-box; 11 | box-sizing: border-box; 12 | } 13 | 14 | /* emulate a headline 15 | (only with 'emulatedHeadlines' config option set) 16 | @deprecated 2018-03-20 */ 17 | .plugin_wrap.wrap__emuhead em strong { 18 | font-size: 130%; 19 | font-weight: bold; 20 | font-style: normal; 21 | display: block; 22 | } 23 | /* emulate a bigger headline with a bottom border */ 24 | .plugin_wrap.wrap__emuhead em strong em.u { 25 | font-size: 115%; 26 | border-bottom: 1px solid @ini_border; 27 | font-style: normal; 28 | text-decoration: none; 29 | display: block; 30 | } 31 | /* different bigger headline for safety notes */ 32 | .wrap_danger.wrap__emuhead em strong em.u, 33 | .wrap_warning.wrap__emuhead em strong em.u, 34 | .wrap_caution.wrap__emuhead em strong em.u, 35 | .wrap_notice.wrap__emuhead em strong em.u, 36 | .wrap_safety.wrap__emuhead em strong em.u { 37 | text-transform: uppercase; 38 | border-bottom-width: 0; 39 | } 40 | /* change border colour of emulated headlines inside boxes to something more neutral 41 | (to match all the different background colours) */ 42 | .wrap_box.wrap__emuhead em strong em.u, 43 | .wrap_info.wrap__emuhead em strong em.u, 44 | .wrap_important.wrap__emuhead em strong em.u, 45 | .wrap_alert.wrap__emuhead em strong em.u, 46 | .wrap_tip.wrap__emuhead em strong em.u, 47 | .wrap_help.wrap__emuhead em strong em.u, 48 | .wrap_todo.wrap__emuhead em strong em.u, 49 | .wrap_download.wrap__emuhead em strong em.u { 50 | border-bottom-color: #999; 51 | } 52 | 53 | /* real headlines should not be indented inside a wrap */ 54 | .plugin_wrap h1, 55 | .plugin_wrap h2, 56 | .plugin_wrap h3, 57 | .plugin_wrap h4, 58 | .plugin_wrap h5 { 59 | margin-left: 0; 60 | margin-right: 0; 61 | } 62 | 63 | /* columns 64 | ********************************************************************/ 65 | 66 | .wrap_left, 67 | .wrap_column { 68 | float: left; 69 | margin-right: 1.5em; 70 | } 71 | [dir=rtl] .wrap_column { 72 | float: right; 73 | margin-left: 1.5em; 74 | margin-right: 0; 75 | } 76 | .wrap_right { 77 | float: right; 78 | margin-left: 1.5em; 79 | } 80 | .wrap_center { 81 | display: block; 82 | margin-left: auto; 83 | margin-right: auto; 84 | } 85 | 86 | /*____________ CSS3 columns ____________*/ 87 | 88 | .wrap_col2, .wrap_col3, .wrap_col4, .wrap_col5, 89 | .wrap_colsmall, .wrap_colmedium, .wrap_collarge { 90 | -moz-column-gap: 1.5em; 91 | -webkit-column-gap: 1.5em; 92 | column-gap: 1.5em; 93 | -moz-column-rule: 1px dotted #666; 94 | -webkit-column-rule: 1px dotted #666; 95 | column-rule: 1px dotted #666; 96 | } 97 | .wrap_col2 { 98 | -moz-column-count: 2; 99 | -webkit-column-count: 2; 100 | column-count: 2; 101 | } 102 | .wrap_col3 { 103 | -moz-column-count: 3; 104 | -webkit-column-count: 3; 105 | column-count: 3; 106 | } 107 | .wrap_col4 { 108 | -moz-column-count: 4; 109 | -webkit-column-count: 4; 110 | column-count: 4; 111 | } 112 | .wrap_col5 { 113 | -moz-column-count: 5; 114 | -webkit-column-count: 5; 115 | column-count: 5; 116 | } 117 | 118 | .wrap_colsmall { 119 | -moz-column-width: 10em; 120 | -webkit-column-width: 10em; 121 | column-width: 10em; 122 | } 123 | .wrap_colmedium { 124 | -moz-column-width: 20em; 125 | -webkit-column-width: 20em; 126 | column-width: 20em; 127 | } 128 | .wrap_collarge { 129 | -moz-column-width: 30em; 130 | -webkit-column-width: 30em; 131 | column-width: 30em; 132 | } 133 | 134 | 135 | /* widths 136 | ********************************************************************/ 137 | 138 | .wrap_twothirds { 139 | width: 65%; 140 | margin-right: 5%; 141 | } 142 | 143 | .wrap_half { 144 | width: 48%; 145 | margin-right: 4%; 146 | } 147 | 148 | .wrap_third { 149 | width: 30%; 150 | margin-right: 5%; 151 | } 152 | 153 | .wrap_quarter { 154 | width: 22%; 155 | margin-right: 4%; 156 | } 157 | 158 | [dir=rtl] .wrap_half, 159 | [dir=rtl] .wrap_quarter { 160 | margin-right: 0; 161 | margin-left: 4%; 162 | } 163 | [dir=rtl] .wrap_twothirds, 164 | [dir=rtl] .wrap_third { 165 | margin-right: 0; 166 | margin-left: 5%; 167 | } 168 | 169 | /* this doesn't always work when third and twothirds are mixed across rows 170 | but can be fixed by adding any div (e.g. ) after a row */ 171 | .wrap_half + .wrap_half, 172 | .wrap_third + .wrap_twothirds, 173 | .wrap_twothirds + .wrap_third, 174 | .wrap_third + .wrap_third + .wrap_third, 175 | .wrap_quarter + .wrap_quarter + .wrap_quarter + .wrap_quarter { 176 | margin-right: 0; 177 | 178 | [dir=rtl] & { 179 | margin-left: 0; 180 | } 181 | 182 | + * { 183 | clear: left; 184 | [dir=rtl] & { 185 | clear: right; 186 | } 187 | } 188 | } 189 | 190 | /* show 2 instead 4 columns on medium sized screens (mobile, etc) */ 191 | @media only screen and (max-width: 950px) { 192 | 193 | .wrap_quarter { 194 | width: 48%; 195 | } 196 | .wrap_quarter:nth-of-type(2n) { 197 | margin-right: 0; 198 | } 199 | [dir=rtl] .wrap_quarter:nth-of-type(2n) { 200 | margin-left: 0; 201 | } 202 | .wrap_quarter:nth-of-type(2n+1) { 203 | clear: left; 204 | } 205 | [dir=rtl] .wrap_quarter:nth-of-type(2n) { 206 | clear: right; 207 | } 208 | 209 | } /* /@media */ 210 | 211 | /* show full width on smaller screens (mobile, etc) */ 212 | @media only screen and (max-width: 600px) { 213 | 214 | .wrap_twothirds, 215 | .wrap_half, 216 | .wrap_third, 217 | .wrap_quarter { 218 | width: auto; 219 | margin-right: 0; 220 | margin-left: 0; 221 | float: none; 222 | } 223 | 224 | } /* /@media */ 225 | 226 | 227 | /* alignments 228 | ********************************************************************/ 229 | 230 | .wrap_leftalign { 231 | text-align: left; 232 | } 233 | .wrap_centeralign { 234 | text-align: center; 235 | } 236 | .wrap_rightalign { 237 | text-align: right; 238 | } 239 | .wrap_justify { 240 | text-align: justify; 241 | } 242 | 243 | 244 | /* box 245 | ********************************************************************/ 246 | 247 | /* see styles for boxes and notes with icons in style.css */ 248 | 249 | /*____________ rounded corners ____________*/ 250 | /* (only for modern browsers) */ 251 | 252 | div.wrap_round { 253 | border-radius: 1.4em; 254 | } 255 | span.wrap_round { 256 | border-radius: .14em; 257 | } 258 | 259 | 260 | /* mark 261 | ********************************************************************/ 262 | 263 | .wrap_lo { 264 | color: @ini_text_neu; 265 | font-size: 85%; 266 | } 267 | .wrap_em { 268 | color: #c00; 269 | font-weight: bold; 270 | } 271 | .wrap__dark.wrap_em { 272 | color: #f66; 273 | } 274 | 275 | /* see styles for highlighted text in style.css */ 276 | 277 | 278 | /* miscellaneous 279 | ********************************************************************/ 280 | 281 | /*____________ tablewidth ____________*/ 282 | 283 | .wrap_tablewidth table { 284 | width: 100%; 285 | } 286 | 287 | /*____________ indent ____________*/ 288 | 289 | .wrap_indent { 290 | padding-left: 1.5em; 291 | } 292 | [dir=rtl] .wrap_indent { 293 | padding-right: 1.5em; 294 | padding-left: 0; 295 | } 296 | 297 | 298 | /*____________ outdent ____________*/ 299 | 300 | .wrap_outdent { 301 | margin-left: -1.5em; 302 | } 303 | [dir=rtl] .wrap_outdent { 304 | margin-right: -1.5em; 305 | margin-left: 0; 306 | } 307 | 308 | /*____________ word wrapping in pre ____________*/ 309 | 310 | div.wrap_prewrap pre { 311 | white-space: pre-wrap; 312 | word-wrap: break-word;/* for IE < 8 */ 313 | } 314 | 315 | /*____________ spoiler ____________*/ 316 | 317 | div.wrap_spoiler { 318 | margin-bottom: 1.5em; 319 | } 320 | /* see rest of spoiler styles in style.css */ 321 | 322 | /*____________ clear float ____________*/ 323 | 324 | .wrap_clear { 325 | clear: both; 326 | line-height: 0; 327 | height: 0; 328 | font-size: 1px; 329 | visibility: hidden; 330 | overflow: hidden; 331 | } 332 | 333 | /*____________ hide ____________*/ 334 | 335 | .wrap_hide { 336 | display: none; 337 | } 338 | 339 | 340 | /*____________ button-style link ____________*/ 341 | 342 | .wrap_button a:link, 343 | .wrap_button a:visited { 344 | background-image: none; 345 | border: 1px solid @ini_border; 346 | border-radius: .3em; 347 | padding: .5em .7em; 348 | text-decoration: none; 349 | } 350 | /* see rest of button link styles in style.css */ 351 | 352 | } /* /.dokuwiki */ 353 | -------------------------------------------------------------------------------- /conf/default.php: -------------------------------------------------------------------------------- 1 | array(0,1)); 10 | $meta['syntaxDiv'] = array('multichoice','_choices' => array('WRAP','block', 'div')); 11 | $meta['syntaxSpan'] = array('multichoice','_choices' => array('wrap', 'inline', 'span')); 12 | $meta['darkTpl'] = array('onoff'); 13 | $meta['emulatedHeadlines'] = array('onoff'); 14 | -------------------------------------------------------------------------------- /example.txt: -------------------------------------------------------------------------------- 1 | ====== Examples for the Wrap Plugin ====== 2 | 3 | ===== Basic syntax ===== 4 | 5 | An uppercase **%%%%** (or alternatively **%%%%** or **%%
%%**) creates a **''div''** and should be used for **"big"** containers, **surrounding** paragraphs, lists, tables, etc. 6 | 7 | 8 | 9 | "big" content 10 | 11 | 12 | or 13 | 14 | "big" content 15 | 16 | 17 | or 18 |
19 | "big" content 20 |
21 |
22 | 23 | A lowercase **%%%%** (or alternatively **%%%%** or **%%%%**) creates a **''span''** and should be used for **"small"** containers, **inside** paragraphs, lists, tables, etc. 24 | 25 | 26 | "small" content 27 | 28 | or 29 | "small" content 30 | 31 | or 32 | "small" content 33 | 34 | 35 | :!: Please note, some things **won't work with lowercase spans**: 36 | * **alignments** (including alignments generated by changing the text direction) 37 | * **multi-columns** 38 | * and **widths** 39 | if the according wrap isn't floated as well. 40 | 41 | A shorthand of uppercase **%%%%** and lowercase **%%%%** are available if the container is empty or unnecessary. 42 | 43 | 44 | 45 | or 46 | 47 | or 48 |
49 | 50 | 51 | and 52 | 53 | 54 | or 55 | 56 | or 57 | 58 | 59 | 60 | ===== Classes and Styles ===== 61 | 62 | 63 | ==== Columns and Floats ==== 64 | 65 | You can have columns easily by adding the class ''column'' and a width, e.g. 66 | ...content... 67 | 68 | The example below uses the following structure: 69 | 70 | 71 | 72 | 73 | ...content... 74 | ...content... 75 | ...content... 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | === Floating Options === 84 | 85 | Normally you would only need the class ''column'', but for more sophisticated uses (not only for columns, but for any other classes, like [[#boxes and notes]] as well) you can have several kinds of "floats": 86 | 87 | * **''column''** is the same as ''left'' in LTR languages and the same as ''right'' in RTL languages 88 | * **''left''** will let you float your wrap on the left 89 | * **''right''** will let the wrap float right 90 | * **''center''** will position the wrap in the horizontal center of the page 91 | 92 | 93 | 94 | === Widths === 95 | 96 | You can set any valid widths (but only on divs): ''%, px, em, rem, ex, ch, vw, vh, pt, pc, cm, mm, in'', but most of the time you'd only want either 97 | 98 | ^type^e.g.^note^ 99 | ^''%''|''30%''|makes sense in most cases| 100 | ^''px''|''420px''|makes sense if your container contains images with a certain width| 101 | ^''em''|''20em''|makes sense if you like your wrap container to grow and shrink with the font size| 102 | 103 | 104 | 105 | === Width Keywords === 106 | 107 | With certain width keywords you can fit your columns automatically to fill the available horizontal space. Those columns will also react to the screen size, so will be responsive and wrap underneath each other on mobile devices. 108 | 109 | There are four width keywords. These should not be combined with any other width, only ''third'' can be combined with ''twothirds''. 110 | 111 | * **''half''** fits two columns in a row 112 | * **''third''** fits three columns in a row 113 | * **''quarter''** fits four columns in a row 114 | * **''twothirds''** together with ''third'' fits a 2/3 and a 1/3 column in a row 115 | 116 | :!: Attention: In order to work properly, wraps with width keywords need an **additional ''%%%%'' around a set** of them. If you mix several types in one group, you might need a ''%%%%'' after a row. 117 | 118 | 119 | 120 | 121 | 122 | You can use the same options with spans (as each element that floats is automatically a block level element), but it probably doesn't make too much sense. :!: Widths on spans normally do not work (by design), but can make sense, when it is floating. 123 | 124 | :!: Attention: What is the difference between widths and width keywords and when is it best to use which? **Widths** can cause problems and will never fully add up, therefore will break the layout under some circumstances. (See [[http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug|box model]] for a technical explanation.) So, getting widths right will need some fiddling around and testing in various browsers. **Width keywords** on the other hand fit automatically and work better on mobile devices. But the drawback is that they need an extra wrap around them and don't work properly in older browsers (IE8 and under). 125 | 126 | All of those options will also work in the [[#boxes and notes]] wraps (see below). 127 | 128 | === Old Emulated Headline (deprecated) === 129 | 130 | When the ''emulatedHeadlines'' config option is enabled, every ''%%//**__text like this__**//%%'' or ''%%//**like that**//%%'' will create an "emulated headline" within a wrap. This feature is deprecated and will be removed at some point as standard headlines within wraps are supported for a while now. 131 | 132 | If that config options is enabled and you need text that is bold and italic, simply use it the other way around: ''%%**//No Headline//**%%''. 133 | 134 | 135 | === Multi-columns === 136 | 137 | 138 | Multi-columns work best in modern browsers (no IE9 and below) but should still be considered experimental as some browser behaviour is still inconsistent and buggy. 139 | 140 | Just use **''%%colsmall%%''** for small width columns, **''%%colmedium%%''** for medium width columns and **''%%collarge%%''** for large width columns. 141 | Or you can use **''%%col2%%''** for 2 columns, **''%%col3%%''** for 3 columns, **''%%col4%%''** for 4 columns and **''%%col5%%''** for 5 columns. 142 | The former type of column is determined by its width, the latter by its amount. The width-based columns are ideal for different layouts and device widths. 143 | 144 | :!: Note: Multi-columns don't make sense for spans. 145 | 146 | 147 | Don't use this for bigger columns containing more than just text. Use the [[#columns and floats]] mentioned above instead. 148 | 149 | 150 | ==== Alignments ==== 151 | 152 | You can use these different text alignments: 153 | 154 | * ''leftalign'' 155 | * ''rightalign'' 156 | * ''centeralign'' 157 | * ''justify'' 158 | 159 | 160 | Center aligned text ... 161 | 162 | 163 | 164 | ... and right aligned. 165 | 166 | 167 | 168 | 169 | Center aligned text ... 170 | 171 | 172 | 173 | ... and right aligned. 174 | 175 | 176 | 177 | :!: You cannot add alignments to spans. 178 | 179 | 180 | ==== Boxes and Notes ==== 181 | 182 | 183 | === round box 500px center === 184 | 185 | * ''box'' creates a box around the container and uses the colours from the template's ''style.ini'' as default colours (''%%__background_alt__%%'' and ''%%__text__%%'') 186 | * any of the classes ''info'', ''tip'', ''important'', ''alert'', ''help'', ''download'', ''todo'' will add a special note container with a corresponding icon 187 | * the classes ''danger'', ''warning'', ''caution'', ''notice'', ''safety'' use safety colours (and no icons) 188 | * ''round'' can be added to anything with a background colour or a border and will only work in modern browsers (no IE8 and under) 189 | 190 | 191 | 192 | 193 | === Info === 194 | %%%% 195 | 196 | 197 | 198 | 199 | === Tip === 200 | %%%% 201 | 202 | 203 | 204 | 205 | === Important === 206 | %%%% 207 | 208 | 209 | 210 | 211 | === Alert === 212 | %%%% 213 | 214 | 215 | 216 | 217 | === Help === 218 | %%%% 219 | 220 | 221 | 222 | 223 | === Download === 224 | %%%% 225 | 226 | 227 | 228 | 229 | === Todo === 230 | %%%% 231 | 232 | 233 | 234 | 235 | 236 | 237 | **Safety Notes:** 238 | 239 | Best only use simple markup in safety notes. 240 | 241 | 242 | === Danger === 243 | %%%% 244 | 245 | 246 | 247 | === Warning === 248 | %%%% 249 | 250 | 251 | 252 | === Caution === 253 | %%%% 254 | 255 | 256 | 257 | === Notice === 258 | %%%% 259 | 260 | 261 | 262 | === Safety === 263 | %%%% 264 | 265 | 266 | 267 | 268 | 269 | You can use notes and boxes also inside text with spans like this: 270 | info, help, alert, important, tip, download, todo and round box and danger, warning, caution, notice, safety. 271 | info, help, ... 272 | 273 | ==== Marks ==== 274 | 275 | You can mark text as highlighted, less significant and especially emphasised. 276 | 277 | You can mark text as highlighted, less significant and especially emphasised. 278 | 279 | :!: This might look ugly in some templates and should be adjusted accordingly. 280 | 281 | ==== Tabs ==== 282 | 283 | You can create a row of tabs by simply wrapping a list of links in ''%%%%''. 284 | 285 | 286 | * [[Some page]] 287 | * [[example|This page]] 288 | * [[Another page]] 289 | 290 | 291 | 292 | * [[Some page]] 293 | * [[example|This page]] 294 | * [[Another page]] 295 | 296 | 297 | :!: Please note, the styling of these tabs depend on the template you are using and not on the wrap plugin. If you only see a list of links and no tabs, please make sure to add "tabs" to the ''noPrefix'' config option and that your template supports at least the 2012-01-25 "Angua" DokuWiki release. 298 | 299 | ==== Miscellaneous ==== 300 | 301 | === Clear float === 302 | 303 | After using any of the float classes, you might come across following text protruding into the space where only the floating containers should be. To prevent that, you should simply add this after your last column: 304 | 305 | 306 | 307 | === Table width === 308 | 309 | You can set the width of a table via ''tablewidth'' as every table inside that wrap will always be 100% wide. This makes it possible to give tables any width by adding an additional width to the wrap (or none for 100%). 310 | 311 | 312 | ^ Table ^ is ^ 313 | | 80% | wide | 314 | 315 | 316 | 317 | ^ Table ^ is ^ 318 | | 80% | wide | 319 | 320 | 321 | === Indent === 322 | 323 | This text will appear indented. 324 | 325 | This text will appear indented. 326 | 327 | === Outdent === 328 | 329 | This text will appear "outdented". 330 | 331 | This text will appear "outdented". 332 | 333 | === Prewrap === 334 | 335 | 336 | 337 | Inside this code block the words will wrap to a new line although they are all in one line. 338 | 339 | 340 | 341 | 342 | 343 | Inside this code block the words will wrap to a new line although they are all in one line. 344 | 345 | 346 | 347 | === Spoiler === 348 | 349 | Here follows a spoiler: Darth Vader is Luke's father. 350 | 351 | Here follows a spoiler: Darth Vader is Luke's father. 352 | 353 | Just select the text in the spoiler box to be able to read its content. 354 | 355 | === Button links === 356 | 357 | A link that looks like a button: [[wiki:Syntax]] 358 | 359 | A link that looks like a button: [[wiki:Syntax]] 360 | 361 | === Hide === 362 | 363 | The following text is hidden: John, please revise that sentence. 364 | 365 | The following text is hidden: John, please revise that sentence. 366 | 367 | :!: Warning: The text will still appear in the source code, in non-modern browsers and is searchable. Do not hide any security risky secrets with it! 368 | 369 | === Pagebreak === 370 | 371 | The following will add a pagebreak: 372 | 373 | The following will add a pagebreak: 374 | 375 | This has no effect on the browser screen. A [[http://reference.sitepoint.com/css/page-break-after|pagebreak]] will force a new page in printouts. 376 | 377 | === Nopagebreak === 378 | 379 | The following will try to avoid a pagebreak: much content, belonging together (like a long table) 380 | 381 | The following will try to avoid a pagebreak: much content, belonging together (like a long table) 382 | 383 | This also has no effect on the browser screen. It will try to [[http://reference.sitepoint.com/css/page-break-inside|avoid a page break]] in printouts. 384 | 385 | === Noprint === 386 | 387 | This text appears on the screen, but not in print. 388 | 389 | This text appears on the screen, but not in print. 390 | 391 | === Onlyprint === 392 | 393 | This text does not appear on the screen, but only in print. 394 | 395 | This text does not appear on the screen, but only in print. 396 | 397 | 398 | ==== Combining and Nesting ==== 399 | 400 | You can combine and nest all classes and types of boxes, e.g. 401 | 402 | 403 | ===Outer box floats right === 404 | 405 | 406 | Inner nested box floats left and is partly __em__phasized and __hi__ghlighted with a nested __notice__ inside. 407 | 408 | 409 | Text inside outer right box, but beneath inner left box. 410 | 411 | 412 | 413 | 414 | Round tip box underneath, after a ''clear''. 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | === Outer box floats right === 423 | 424 | 425 | Inner nested box floats left and is partly __em__phasized and __hi__ghlighted with a nested __notice__ inside. 426 | 427 | 428 | Text inside outer right box, but beneath inner left box. 429 | 430 | 431 | 432 | 433 | Round tip box underneath, after a ''clear''. 434 | 435 | 436 | 437 | 438 | 439 | 440 | ===== Language and Text Direction ===== 441 | 442 | You can change the language and the reading direction of a wrap container by simply adding a colon followed by the language code, like this: 443 | 444 | 445 | 446 | זה עברית. ((This means "This is Hebrew.", at least according to [[http://translate.google.com/|Google Translate]].)) 447 | 448 | 449 | 450 | 451 | זה עברית. ((This means "This is Hebrew.", at least according to [[http://translate.google.com/|Google Translate]].)) 452 | 453 | 454 | The text direction (''rtl'', right to left or ''ltr'', left to right) will get inserted automatically and is solely dependent on the language. The list of currently supported languages is taken from: http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code 455 | (If you specify a language not listed there, it simply won't do anything.) 456 | -------------------------------------------------------------------------------- /helper.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | class helper_plugin_wrap extends DokuWiki_Plugin { 10 | static protected $boxes = array ('wrap_box', 'wrap_danger', 'wrap_warning', 'wrap_caution', 'wrap_notice', 'wrap_safety', 11 | 'wrap_info', 'wrap_important', 'wrap_alert', 'wrap_tip', 'wrap_help', 'wrap_todo', 12 | 'wrap_download', 'wrap_hi', 'wrap_spoiler'); 13 | static protected $paragraphs = array ('wrap_leftalign', 'wrap_rightalign', 'wrap_centeralign', 'wrap_justify'); 14 | 15 | /* list of languages which normally use RTL scripts */ 16 | static protected $rtllangs = array('ar','dv','fa','ha','he','ks','ku','ps','ur','yi','arc'); 17 | /* list of right-to-left scripts (may override the language defaults to rtl) */ 18 | static protected $rtlscripts = array('arab','thaa','hebr','deva','shrd'); 19 | /* selection of left-to-right scripts (may override the language defaults to ltr) */ 20 | static protected $ltrscripts = array('latn','cyrl','grek','hebr','cyrs','armn'); 21 | 22 | static $box_left_pos = 0; 23 | static $box_right_pos = 0; 24 | static $box_first = true; 25 | static $table_entr = 0; 26 | 27 | protected $column_count = 0; 28 | 29 | /** 30 | * get attributes (pull apart the string between '') 31 | * and identify classes, width, lang and dir 32 | * 33 | * @author Anika Henke 34 | * @author Christopher Smith 35 | * (parts taken from http://www.dokuwiki.org/plugin:box) 36 | */ 37 | function getAttributes($data, $useNoPrefix=true) { 38 | 39 | $attr = array( 40 | 'lang' => null, 41 | 'class' => null, 42 | 'width' => null, 43 | 'id' => null, 44 | 'dir' => null 45 | ); 46 | $tokens = preg_split('/\s+/', $data, 9); 47 | 48 | // anonymous function to convert inclusive comma separated items to regex pattern 49 | $pattern = function ($csv) { 50 | return '/^(?:'. str_replace(['?','*',' ',','], 51 | ['.','.*','','|'], $csv) .')$/'; 52 | }; 53 | 54 | // noPrefix: comma separated class names that should be excluded from 55 | // being prefixed with "wrap_", 56 | // each item may contain wildcard (*, ?) 57 | $noPrefix = ($this->getConf('noPrefix') && $useNoPrefix) ? $pattern($this->getConf('noPrefix')) : ''; 58 | 59 | // restrictedClasses : comma separated class names that should be checked 60 | // based on restriction type (whitelist or blacklist), 61 | // each item may contain wildcard (*, ?) 62 | $restrictedClasses = ($this->getConf('restrictedClasses')) ? 63 | $pattern($this->getConf('restrictedClasses')) : ''; 64 | $restrictionType = $this->getConf('restrictionType'); 65 | 66 | foreach ($tokens as $token) { 67 | 68 | //get width 69 | if (preg_match('/^\d*\.?\d+(%|px|em|rem|ex|ch|vw|vh|pt|pc|cm|mm|in)$/', $token)) { 70 | $attr['width'] = $token; 71 | continue; 72 | } 73 | 74 | //get lang 75 | if (preg_match('/:([a-z\-]+)/', $token)) { 76 | $attr['lang'] = trim($token,':'); 77 | continue; 78 | } 79 | 80 | //get id 81 | if (preg_match('/#([A-Za-z0-9_-]+)/', $token)) { 82 | $attr['id'] = trim($token,'#'); 83 | continue; 84 | } 85 | 86 | //get classes 87 | //restrict token (class names) characters to prevent any malicious data 88 | if (preg_match('/[^A-Za-z0-9_-]/',$token)) continue; 89 | if ($restrictedClasses) { 90 | $classIsInList = preg_match($restrictedClasses, $token); 91 | // either allow only certain classes or disallow certain classes 92 | if ($restrictionType xor $classIsInList) continue; 93 | } 94 | // prefix adjustment of class name 95 | $prefix = (!empty($noPrefix) && preg_match($noPrefix, $token)) ? '' : 'wrap_'; 96 | $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').$prefix.$token; 97 | } 98 | if ($this->getConf('darkTpl')) { 99 | $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').'wrap__dark'; 100 | } 101 | if ($this->getConf('emulatedHeadings')) { 102 | $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').'wrap__emuhead'; 103 | } 104 | 105 | /* improved RTL detection to make sure it covers more cases: */ 106 | if($attr['lang'] && $attr['lang'] !== '') { 107 | 108 | // turn the language code into an array of components: 109 | $arr = explode('-', $attr['lang']); 110 | 111 | // is the language iso code (first field) in the list of RTL languages? 112 | $rtl = in_array($arr[0], self::$rtllangs); 113 | 114 | // is there a Script specified somewhere which overrides the text direction? 115 | $rtl = ($rtl xor (bool) array_intersect( $rtl ? self::$ltrscripts : self::$rtlscripts, $arr)); 116 | 117 | $attr['dir'] = ( $rtl ? 'rtl' : 'ltr' ); 118 | } 119 | 120 | return $attr; 121 | } 122 | 123 | /** 124 | * build attributes (write out classes, width, lang and dir) 125 | */ 126 | function buildAttributes($data, $addClass='', $mode='xhtml') { 127 | 128 | $attr = $this->getAttributes($data); 129 | $out = ''; 130 | 131 | if ($mode=='xhtml') { 132 | if($attr['class']) $out .= ' class="'.hsc($attr['class']).' '.$addClass.'"'; 133 | // if used in other plugins, they might want to add their own class(es) 134 | elseif($addClass) $out .= ' class="'.$addClass.'"'; 135 | if($attr['id']) $out .= ' id="'.hsc($attr['id']).'"'; 136 | // width on spans normally doesn't make much sense, but in the case of floating elements it could be used 137 | if($attr['width']) { 138 | if (strpos($attr['width'],'%') !== false) { 139 | $out .= ' style="width: '.hsc($attr['width']).';"'; 140 | } else { 141 | // anything but % should be 100% when the screen gets smaller 142 | $out .= ' style="width: '.hsc($attr['width']).'; max-width: 100%;"'; 143 | } 144 | } 145 | // only write lang if it's a language in lang2dir.conf 146 | if($attr['dir']) $out .= ' lang="'.$attr['lang'].'" xml:lang="'.$attr['lang'].'" dir="'.$attr['dir'].'"'; 147 | } 148 | 149 | return $out; 150 | } 151 | 152 | /** 153 | * render ODT element, Open 154 | * (get Attributes, select ODT element that fits, render it, return element name) 155 | */ 156 | function renderODTElementOpen($renderer, $HTMLelement, $data) { 157 | $attr = $this->getAttributes($data, false); 158 | $attr_string = $this->buildAttributes($data); 159 | $classes = explode (' ', $attr['class']); 160 | 161 | // Get language 162 | $language = $attr['lang']; 163 | 164 | $is_indent = in_array ('wrap_indent', $classes); 165 | $is_outdent = in_array ('wrap_outdent', $classes); 166 | $is_column = in_array ('wrap_column', $classes); 167 | $is_group = in_array ('wrap_group', $classes); 168 | $is_pagebreak = in_array ('wrap_pagebreak', $classes); 169 | 170 | // Check for multicolumns 171 | $columns = 0; 172 | preg_match ('/wrap_col\d/', $attr ['class'], $matches); 173 | if ( empty ($matches [0]) === false ) { 174 | $columns = $matches [0] [strlen($matches [0])-1]; 175 | } 176 | 177 | // Check for boxes 178 | $is_box = false; 179 | foreach (self::$boxes as $box) { 180 | if ( strpos ($attr ['class'], $box) !== false ) { 181 | $is_box = true; 182 | break; 183 | } 184 | } 185 | 186 | // Check for paragraphs 187 | $is_paragraph = false; 188 | if ( empty($language) === false ) { 189 | $is_paragraph = true; 190 | } else { 191 | foreach (self::$paragraphs as $paragraph) { 192 | if ( strpos ($attr ['class'], $paragraph) !== false ) { 193 | $is_paragraph = true; 194 | break; 195 | } 196 | } 197 | } 198 | 199 | $style = null; 200 | if ( empty($attr['width']) === false ) { 201 | $style = 'width: '.$attr['width'].';'; 202 | } 203 | $attr ['class'] = 'dokuwiki '.$attr ['class']; 204 | 205 | // Call corresponding functions for current wrap class 206 | if ( $HTMLelement == 'span' ) { 207 | if ( $is_indent === false && $is_outdent === false ) { 208 | $this->renderODTOpenSpan ($renderer, $attr ['class'], $style, $language, $attr_string); 209 | return 'span'; 210 | } else { 211 | $this->renderODTOpenParagraph ($renderer, $attr ['class'], $style, $attr ['dir'], $language, $is_indent, $is_outdent, true, $attr_string); 212 | return 'paragraph'; 213 | } 214 | } else if ( $HTMLelement == 'div' ) { 215 | if ( $is_box === true ) { 216 | $wrap = $this->loadHelper('wrap'); 217 | $fullattr = $wrap->buildAttributes($data, 'plugin_wrap'); 218 | 219 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) { 220 | $this->renderODTOpenBox ($renderer, $attr ['class'], $style, $fullattr); 221 | } else { 222 | $this->renderODTOpenTable ($renderer, $attr, $style, $attr_string); 223 | } 224 | return 'box'; 225 | } else if ( $columns > 0 ) { 226 | $this->renderODTOpenColumns ($renderer, $attr ['class'], $style); 227 | return 'multicolumn'; 228 | } else if ( $is_paragraph === true || $is_indent === true || $is_outdent === true ) { 229 | $this->renderODTOpenParagraph ($renderer, $attr ['class'], $style, $attr ['dir'], $language, $is_indent, $is_outdent, false, $attr_string); 230 | return 'paragraph'; 231 | } else if ( $is_pagebreak === true ) { 232 | $renderer->pagebreak (); 233 | // Pagebreak hasn't got a closing stack so we return/push 'other' on the stack 234 | return 'other'; 235 | } else if ( $is_column === true ) { 236 | $this->renderODTOpenColumn ($renderer, $attr ['class'], $style, $attr_string); 237 | return 'column'; 238 | } else if ( $is_group === true ) { 239 | $this->renderODTOpenGroup ($renderer, $attr ['class'], $style); 240 | return 'group'; 241 | } else if (strpos ($attr ['class'], 'wrap_clear') !== false ) { 242 | $renderer->linebreak(); 243 | $renderer->p_close(); 244 | $renderer->p_open(); 245 | 246 | self::$box_left_pos = 0; 247 | self::$box_right_pos = 0; 248 | self::$box_first = true; 249 | } 250 | } 251 | return 'other'; 252 | } 253 | 254 | /** 255 | * render ODT element, Close 256 | */ 257 | function renderODTElementClose($renderer, $element) { 258 | switch ($element) { 259 | case 'box': 260 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) { 261 | $this->renderODTCloseBox ($renderer); 262 | } else { 263 | $this->renderODTCloseTable ($renderer); 264 | } 265 | break; 266 | case 'multicolumn': 267 | $this->renderODTCloseColumns($renderer); 268 | break; 269 | case 'paragraph': 270 | $this->renderODTCloseParagraph($renderer); 271 | break; 272 | case 'column': 273 | $this->renderODTCloseColumn($renderer); 274 | break; 275 | case 'group': 276 | $this->renderODTCloseGroup($renderer); 277 | break; 278 | case 'span': 279 | $this->renderODTCloseSpan($renderer); 280 | break; 281 | // No default by intention. 282 | } 283 | } 284 | 285 | function renderODTOpenBox ($renderer, $class, $style, $fullattr) { 286 | $properties = array (); 287 | 288 | if ( method_exists ($renderer, 'getODTProperties') === false ) { 289 | // Function is not supported by installed ODT plugin version, return. 290 | return; 291 | } 292 | 293 | // Get CSS properties for ODT export. 294 | $renderer->getODTProperties ($properties, 'div', $class, $style); 295 | 296 | if ( empty($properties ['background-image']) === false ) { 297 | $properties ['background-image'] = 298 | $renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC); 299 | } 300 | 301 | if ( empty($properties ['float']) === true ) { 302 | // If the float property is not set, set it to 'left' becuase the ODT plugin 303 | // would default to 'center' which is diffeent to the XHTML behaviour. 304 | if ( strpos ($class, 'wrap_center') === false ) { 305 | $properties ['float'] = 'left'; 306 | } else { 307 | $properties ['float'] = 'center'; 308 | } 309 | } 310 | 311 | // The display property has differing usage in CSS. So we better overwrite it. 312 | $properties ['display'] = 'always'; 313 | if ( stripos ($class, 'wrap_noprint') !== false ) { 314 | $properties ['display'] = 'screen'; 315 | } 316 | if ( stripos ($class, 'wrap_onlyprint') !== false ) { 317 | $properties ['display'] = 'printer'; 318 | } 319 | 320 | $renderer->_odtDivOpenAsFrameUseProperties ($properties); 321 | } 322 | 323 | function renderODTCloseBox ($renderer) { 324 | if ( method_exists ($renderer, '_odtDivCloseAsFrame') === false ) { 325 | // Function is not supported by installed ODT plugin version, return. 326 | return; 327 | } 328 | $renderer->_odtDivCloseAsFrame (); 329 | } 330 | 331 | function renderODTOpenColumns ($renderer, $class, $style) { 332 | $properties = array (); 333 | 334 | if ( method_exists ($renderer, 'getODTProperties') === false ) { 335 | // Function is not supported by installed ODT plugin version, return. 336 | return; 337 | } 338 | 339 | // Get CSS properties for ODT export. 340 | $renderer->getODTProperties ($properties, 'div', $class, $style); 341 | 342 | $renderer->_odtOpenMultiColumnFrame($properties); 343 | } 344 | 345 | function renderODTCloseColumns ($renderer) { 346 | if ( method_exists ($renderer, '_odtCloseMultiColumnFrame') === false ) { 347 | // Function is not supported by installed ODT plugin version, return. 348 | return; 349 | } 350 | $renderer->_odtCloseMultiColumnFrame(); 351 | } 352 | 353 | function renderODTOpenParagraph ($renderer, $class, $style, $dir, $language, $is_indent, $is_outdent, $indent_first, $attr=null) { 354 | $properties = array (); 355 | 356 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === true ) { 357 | // Get CSS properties for ODT export. 358 | // Set parameter $inherit=false to prevent changiung the font-size and family! 359 | $renderer->getODTPropertiesNew ($properties, 'p', $attr, null, false); 360 | } else if ( method_exists ($renderer, 'getODTProperties') === true ) { 361 | // Get CSS properties for ODT export (deprecated version). 362 | $renderer->getODTProperties ($properties, 'p', $class, $style); 363 | 364 | if ( empty($properties ['background-image']) === false ) { 365 | $properties ['background-image'] = 366 | $renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC); 367 | } 368 | } else { 369 | // To old ODT plugin version. 370 | return; 371 | } 372 | 373 | if ( empty($properties ['text-align']) ) 374 | { 375 | if ($dir == 'ltr') { 376 | $properties ['text-align'] = 'left'; 377 | $properties ['writing-mode'] = 'lr'; 378 | } 379 | if ($dir == 'rtl') { 380 | $properties ['text-align'] = 'right'; 381 | $properties ['writing-mode'] = 'rl'; 382 | } 383 | } 384 | 385 | $name = ''; 386 | if ( empty($language) === false ) { 387 | $properties ['lang'] = $language; 388 | $name .= 'Language: '.$language; 389 | } 390 | 391 | if ( $indent_first === true ) { 392 | // Eventually indent or outdent first line only... 393 | if ( $is_indent === true ) { 394 | // FIXME: Has to be adjusted if test direction will be supported. 395 | // See all.css 396 | $properties ['text-indent'] = $properties ['padding-left']; 397 | $properties ['padding-left'] = 0; 398 | $name .= 'Indent first'; 399 | } 400 | if ( $is_outdent === true ) { 401 | // FIXME: Has to be adjusted if text (RTL, LTR) direction will be supported. 402 | // See all.css 403 | $properties ['text-indent'] = $properties ['margin-left']; 404 | $properties ['margin-left'] = 0; 405 | $name .= 'Outdent first'; 406 | } 407 | } else { 408 | // Eventually indent or outdent the whole paragraph... 409 | if ( $is_indent === true ) { 410 | // FIXME: Has to be adjusted if test direction will be supported. 411 | // See all.css 412 | $properties ['margin-left'] = $properties ['padding-left'] ?? null; 413 | $properties ['padding-left'] = 0; 414 | $name .= 'Indent'; 415 | } 416 | if ( $is_outdent === true ) { 417 | // Nothing to change: keep left margin property. 418 | // FIXME: Has to be adjusted if text (RTL, LTR) direction will be supported. 419 | // See all.css 420 | $name .= 'Outdent'; 421 | } 422 | } 423 | 424 | $renderer->p_close(); 425 | if ( method_exists ($renderer, 'createParagraphStyle') === false ) { 426 | // Older ODT plugin version. 427 | $renderer->_odtParagraphOpenUseProperties($properties); 428 | } else { 429 | // Newer version create our own common styles. 430 | 431 | // Create parent style to group the others beneath it 432 | if (!$renderer->styleExists('Plugin_Wrap_Paragraphs')) { 433 | $parent_properties = array(); 434 | $parent_properties ['style-parent'] = null; 435 | $parent_properties ['style-class'] = 'Plugin Wrap Paragraphs'; 436 | $parent_properties ['style-name'] = 'Plugin_Wrap_Paragraphs'; 437 | $parent_properties ['style-display-name'] = 'Plugin Wrap'; 438 | $renderer->createParagraphStyle($parent_properties); 439 | } 440 | 441 | $name .= $this->getODTCommonStyleName($class); 442 | $style_name = 'Plugin_Wrap_Paragraph_'.$name; 443 | if (!$renderer->styleExists($style_name)) { 444 | $properties ['style-parent'] = 'Plugin_Wrap_Paragraphs'; 445 | $properties ['style-class'] = null; 446 | $properties ['style-name'] = $style_name; 447 | $properties ['style-display-name'] = $name; 448 | $renderer->createParagraphStyle($properties); 449 | } 450 | 451 | $renderer->p_open($style_name); 452 | } 453 | } 454 | 455 | function renderODTCloseParagraph ($renderer) { 456 | if ( method_exists ($renderer, 'p_close') === false ) { 457 | // Function is not supported by installed ODT plugin version, return. 458 | return; 459 | } 460 | $renderer->p_close(); 461 | } 462 | 463 | function renderODTOpenColumn ($renderer, $class, $style, $attr) { 464 | $properties = array (); 465 | 466 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === true ) { 467 | // Get CSS properties for ODT export. 468 | $renderer->getODTPropertiesNew ($properties, 'div', $attr); 469 | } else if ( method_exists ($renderer, 'getODTProperties') === true ) { 470 | // Get CSS properties for ODT export (deprecated version). 471 | $renderer->getODTProperties ($properties, null, $class, $style); 472 | } else { 473 | // To old ODT plugin version. 474 | return; 475 | } 476 | 477 | // Frames/Textboxes still have some issues with formatting (at least in LibreOffice) 478 | // So as a workaround we implement columns as a table. 479 | // This is why we now use the margin of the div as the padding for the ODT table. 480 | $properties ['padding-left'] = $properties ['margin-left'] ?? null; 481 | $properties ['padding-right'] = $properties ['margin-right'] ?? null; 482 | $properties ['padding-top'] = $properties ['margin-top'] ?? null; 483 | $properties ['padding-bottom'] = $properties ['margin-bottom'] ?? null; 484 | $properties ['margin-left'] = null; 485 | $properties ['margin-right'] = null; 486 | $properties ['margin-top'] = null; 487 | $properties ['margin-bottom'] = null; 488 | 489 | // Percentage values are not supported for the padding. Convert to absolute values. 490 | $length = strlen ($properties ['padding-left']); 491 | if ( $length > 0 && $properties ['padding-left'] [$length-1] == '%' ) { 492 | $properties ['padding-left'] = trim ($properties ['padding-left'], '%'); 493 | $properties ['padding-left'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-left']).'cm'; 494 | } 495 | $length = strlen ($properties ['padding-right']); 496 | if ( $length > 0 && $properties ['padding-right'] [$length-1] == '%' ) { 497 | $properties ['padding-right'] = trim ($properties ['padding-right'], '%'); 498 | $properties ['padding-right'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-right']).'cm'; 499 | } 500 | $length = strlen ($properties ['padding-top']); 501 | if ( $length > 0 && $properties ['padding-top'] [$length-1] == '%' ) { 502 | $properties ['padding-top'] = trim ($properties ['padding-top'], '%'); 503 | $properties ['padding-top'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-top']).'cm'; 504 | } 505 | $length = strlen ($properties ['padding-bottom']); 506 | if ( $length > 0 && $properties ['padding-bottom'] [$length-1] == '%' ) { 507 | $properties ['padding-bottom'] = trim ($properties ['padding-bottom'], '%'); 508 | $properties ['padding-bottom'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-bottom']).'cm'; 509 | } 510 | 511 | $this->column_count++; 512 | if ( $this->column_count == 1 ) { 513 | // If this is the first column opened since the group was opened 514 | // then we have to open the table and a (single) row first. 515 | $properties ['width'] = '100%'; 516 | $renderer->_odtTableOpenUseProperties($properties); 517 | $renderer->_odtTableRowOpenUseProperties($properties); 518 | } 519 | 520 | // We did not specify any max column value when we opened the table. 521 | // So we have to tell the renderer to add a column just now. 522 | unset($properties ['width']); 523 | $renderer->_odtTableAddColumnUseProperties($properties); 524 | 525 | // Open the cell. 526 | $renderer->_odtTableCellOpenUseProperties($properties); 527 | } 528 | 529 | function renderODTCloseColumn ($renderer) { 530 | if ( method_exists ($renderer, '_odtTableAddColumnUseProperties') === false ) { 531 | // Function is not supported by installed ODT plugin version, return. 532 | return; 533 | } 534 | 535 | $renderer->tablecell_close(); 536 | } 537 | 538 | function renderODTOpenGroup ($renderer, $class, $style) { 539 | // Nothing to do for now. 540 | } 541 | 542 | function renderODTCloseGroup ($renderer) { 543 | // If a table has been opened in the group we close it now. 544 | if ( $this->column_count > 0 ) { 545 | // At last we need to close the row and the table! 546 | $renderer->tablerow_close(); 547 | //$renderer->table_close(); 548 | $renderer->_odtTableClose(); 549 | } 550 | $this->column_count = 0; 551 | } 552 | 553 | function renderODTOpenSpan ($renderer, $class, $style, $language, $attr) { 554 | $properties = array (); 555 | 556 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === true ) { 557 | // Get CSS properties for ODT export. 558 | // Set parameter $inherit=false to prevent changiung the font-size and family! 559 | $renderer->getODTPropertiesNew ($properties, 'span', $attr, null, false); 560 | } else if ( method_exists ($renderer, 'getODTProperties') === true ) { 561 | // Get CSS properties for ODT export (deprecated version). 562 | $renderer->getODTProperties ($properties, 'span', $class, $style); 563 | 564 | if ( empty($properties ['background-image']) === false ) { 565 | $properties ['background-image'] = 566 | $renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC); 567 | } 568 | } else { 569 | // To old ODT plugin version. 570 | return; 571 | } 572 | 573 | $name = ''; 574 | if ( empty($language) === false ) { 575 | $properties ['lang'] = $language; 576 | $name .= 'Language: '.$language; 577 | } 578 | 579 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) { 580 | // Older ODT plugin version. 581 | $renderer->_odtSpanOpenUseProperties($properties); 582 | } else { 583 | // Newer version create our own common styles. 584 | $properties ['font-size'] = null; 585 | 586 | // Create parent style to group the others beneath it 587 | if (!$renderer->styleExists('Plugin_Wrap_Spans')) { 588 | $parent_properties = array(); 589 | $parent_properties ['style-parent'] = null; 590 | $parent_properties ['style-class'] = 'Plugin Wrap Spans'; 591 | $parent_properties ['style-name'] = 'Plugin_Wrap_Spans'; 592 | $parent_properties ['style-display-name'] = 'Plugin Wrap'; 593 | $renderer->createTextStyle($parent_properties); 594 | } 595 | 596 | $name .= $this->getODTCommonStyleName($class); 597 | $style_name = 'Plugin_Wrap_Span_'.$name; 598 | if (!$renderer->styleExists($style_name)) { 599 | $properties ['style-parent'] = 'Plugin_Wrap_Spans'; 600 | $properties ['style-class'] = null; 601 | $properties ['style-name'] = $style_name; 602 | $properties ['style-display-name'] = $name; 603 | $renderer->createTextStyle($properties); 604 | } 605 | 606 | if (!empty($properties ['background-image'])) { 607 | if (method_exists ($renderer, '_odtAddImageUseProperties') === true) { 608 | $size = null; 609 | if (!empty($properties ['font-size'])) { 610 | $size = $properties ['font-size']; 611 | $size = $renderer->addToValue($size, '2pt'); 612 | } 613 | $properties ['width'] = $size; 614 | $properties ['height'] = $size; 615 | $properties ['title'] = null; 616 | $renderer->_odtAddImageUseProperties ($properties ['background-image'],$properties); 617 | } else { 618 | $renderer->_odtAddImage ($properties ['background-image'],null,null,null,null,null); 619 | } 620 | } 621 | $renderer->_odtSpanOpen($style_name); 622 | } 623 | } 624 | 625 | function renderODTCloseSpan ($renderer) { 626 | if ( method_exists ($renderer, '_odtSpanClose') === false ) { 627 | // Function is not supported by installed ODT plugin version, return. 628 | return; 629 | } 630 | $renderer->_odtSpanClose(); 631 | } 632 | 633 | function renderODTOpenTable ($renderer, $attr, $style, $attr_string) { 634 | self::$table_entr += 1; 635 | 636 | $class = $attr ['class']; 637 | $css_properties = array (); 638 | 639 | if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) { 640 | // Function is not supported by installed ODT plugin version, return. 641 | return; 642 | } 643 | 644 | // Get CSS properties for ODT export. 645 | $renderer->getODTPropertiesNew ($css_properties, 'div', $attr_string, null, true); 646 | 647 | if ( empty($css_properties ['float']) === true ) { 648 | // If the float property is not set, set it to 'left' becuase the ODT plugin 649 | // would default to 'center' which is diffeent to the XHTML behaviour. 650 | //$css_properties ['float'] = 'left'; 651 | if (strpos ($class, 'wrap_left') !== false ) { 652 | $css_properties ['float'] = 'left'; 653 | } else if (strpos ($class, 'wrap_center') !== false ) { 654 | $css_properties ['float'] = 'center'; 655 | } else if (strpos ($class, 'wrap_right') !== false) { 656 | $css_properties ['float'] = 'right'; 657 | } 658 | } 659 | 660 | // The display property has differing usage in CSS. So we better overwrite it. 661 | $css_properties ['display'] = 'always'; 662 | if ( stripos ($class, 'wrap_noprint') !== false ) { 663 | $css_properties ['display'] = 'screen'; 664 | } 665 | if ( stripos ($class, 'wrap_onlyprint') !== false ) { 666 | $css_properties ['display'] = 'printer'; 667 | } 668 | 669 | $background_color = $css_properties ['background-color']; 670 | $image = $css_properties ['background-image'] ?? null; 671 | $margin_top = $css_properties ['margin-top']; 672 | $margin_right = $css_properties ['margin-right']; 673 | $margin_bottom = $css_properties ['margin-bottom']; 674 | $margin_left = $css_properties ['margin-left']; 675 | $width = $attr ['width']; 676 | 677 | // Open 2x1 table if image is present 678 | // otherwise only a 1x1 table 679 | $properties = array(); 680 | $properties ['width'] = '100%'; 681 | $properties ['align'] = 'center'; 682 | $properties ['margin-top'] = $margin_top; 683 | $properties ['margin-right'] = $margin_right; 684 | $properties ['margin-bottom'] = $margin_bottom; 685 | $properties ['margin-left'] = $margin_left; 686 | 687 | $frame_props = array(); 688 | if (!empty($css_properties ['border'])) { 689 | $frame_props ['border'] = $css_properties ['border']; 690 | } else { 691 | $frame_props ['border'] = 'none'; 692 | } 693 | $frame_props ['min-height'] = '1cm'; 694 | $frame_props ['width'] = $attr ['width']; 695 | $frame_props ['float'] = $css_properties ['float']; 696 | if ( self::$table_entr > 1 ) { 697 | $frame_props ['anchor-type'] = 'as-char'; 698 | } else { 699 | $frame_props ['anchor-type'] = 'paragraph'; 700 | } 701 | $frame_props ['textarea-horizontal-align'] = 'left'; 702 | $frame_props ['run-through'] = 'foreground'; 703 | $frame_props ['vertical-pos'] = 'from-top'; 704 | $frame_props ['vertical-rel'] = 'paragraph'; 705 | $frame_props ['horizontal-pos'] = 'from-left'; 706 | $frame_props ['horizontal-rel'] = 'paragraph'; 707 | $frame_props ['wrap'] = 'parallel'; 708 | $frame_props ['number-wrapped-paragraphs'] = 'no-limit'; 709 | if (!empty($frame_props ['float']) && 710 | $frame_props ['float'] != 'center') { 711 | $frame_props ['margin-top'] = '0cm'; 712 | $frame_props ['margin-right'] = '0cm'; 713 | $frame_props ['margin-bottom'] = '0cm'; 714 | $frame_props ['margin-left'] = '0cm'; 715 | $frame_props ['padding-top'] = '0cm'; 716 | $frame_props ['padding-bottom'] = '0cm'; 717 | } else { 718 | // No wrapping on not floating divs 719 | $frame_props ['wrap'] = 'none'; 720 | } 721 | 722 | switch ($frame_props ['float']) { 723 | case 'left': 724 | if ( self::$table_entr == 1 ) { 725 | $frame_props ['y'] = '0cm'; 726 | $frame_props ['x'] = self::$box_left_pos.'cm'; 727 | self::$box_left_pos += trim($frame_props ['width'], 'cm'); 728 | } 729 | $frame_props ['padding-left'] = '0cm'; 730 | break; 731 | case 'right': 732 | $frame_props ['horizontal-rel'] = 'paragraph'; 733 | $frame_props ['horizontal-pos'] = 'right'; 734 | $frame_props ['padding-right'] = '0cm'; 735 | break; 736 | case 'center': 737 | $frame_props ['horizontal-pos'] = 'center'; 738 | break; 739 | default: 740 | $frame_props ['padding-left'] = '0cm'; 741 | break; 742 | } 743 | $renderer->_odtOpenTextBoxUseProperties($frame_props); 744 | 745 | $renderer->_odtTableOpenUseProperties($properties); 746 | 747 | if (!empty($image)) { 748 | $properties = array(); 749 | $properties ['width'] = '2cm'; 750 | $renderer->_odtTableAddColumnUseProperties($properties); 751 | } 752 | 753 | $properties = array(); 754 | $renderer->_odtTableAddColumnUseProperties($properties); 755 | 756 | $renderer->tablerow_open(); 757 | 758 | if (!empty($image)) { 759 | $properties = array(); 760 | $properties ['vertical-align'] = 'middle'; 761 | $properties ['text-align'] = 'center'; 762 | $properties ['padding'] = '0.1cm'; 763 | $properties ['background-color'] = $background_color; 764 | 765 | $renderer->_odtTableCellOpenUseProperties($properties); 766 | $renderer->_odtAddImage($image); 767 | $renderer->tablecell_close(); 768 | } 769 | 770 | $properties = array(); 771 | $properties ['vertical-align'] = 'middle'; 772 | $properties ['padding'] = '0.3cm'; 773 | $properties ['background-color'] = $background_color; 774 | $properties ['border'] = 'none'; 775 | $renderer->_odtTableCellOpenUseProperties($properties); 776 | } 777 | 778 | function renderODTCloseTable ($renderer) { 779 | $renderer->tablecell_close(); 780 | $renderer->tablerow_close(); 781 | $renderer->_odtTableClose(); 782 | $renderer->_odtCloseTextBox (); 783 | $renderer->p_open(); 784 | $renderer->p_close(); 785 | 786 | self::$table_entr -= 1; 787 | } 788 | 789 | protected function getODTCommonStyleName ($class_string) { 790 | static $map = array ( 791 | 'wrap_box' => 'Box', 'wrap_danger' => 'Danger', 'wrap_warning' => 'Warning', 792 | 'wrap_caution' => 'Caution', 'wrap_notice' => 'Notice', 'wrap_safety' => 'Safety', 793 | 'wrap_info' => 'Info', 'wrap_important' => 'Important', 'wrap_alert' => 'Alert', 794 | 'wrap_tip' => 'Tip', 'wrap_help' => 'Help', 'wrap_todo' => 'To do', 795 | 'wrap_download' => 'Download', 'wrap_hi' => 'Highlighted', 'wrap_spoiler' => 'Spoiler', 796 | 'wrap_leftalign' => 'Left aligned', 'wrap_rightalign' => 'Right aligned', 797 | 'wrap_centeralign' => 'Centered', 'wrap_justify' => 'Justify', 'wrap_em' => 'Emphasised', 798 | 'wrap_lo' => 'Less significant'); 799 | $classes = explode(' ', $class_string); 800 | $name = ''; 801 | foreach ($classes as $class) { 802 | if (array_key_exists($class, $map)) { 803 | $name .= $map [$class]; 804 | } 805 | } 806 | return ($name); 807 | } 808 | } 809 | -------------------------------------------------------------------------------- /images/README: -------------------------------------------------------------------------------- 1 | _NOTE_ 2 | 3 | Icon set: Human-O2 4 | Designer: Oliver Scholtz (and others) [~schollidesign] 5 | License: GPL (http://www.gnu.org/copyleft/gpl.html) 6 | URL: http://schollidesign.deviantart.com/art/Human-O2-Iconset-105344123 7 | 8 | _TOOLBAR_ 9 | 10 | Icon set: Silk 11 | Designer: Mark James 12 | License: Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/) 13 | URL: http://www.famfamfam.com/lab/icons/silk/ 14 | 15 | Icon set: Silk Companion 16 | Designer: Damien Guard 17 | License: Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/) 18 | URL: http://www.damieng.com/icons/silkcompanion 19 | -------------------------------------------------------------------------------- /images/note/16/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/alert.png -------------------------------------------------------------------------------- /images/note/16/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/download.png -------------------------------------------------------------------------------- /images/note/16/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/help.png -------------------------------------------------------------------------------- /images/note/16/important.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/important.png -------------------------------------------------------------------------------- /images/note/16/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/info.png -------------------------------------------------------------------------------- /images/note/16/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/tip.png -------------------------------------------------------------------------------- /images/note/16/todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/16/todo.png -------------------------------------------------------------------------------- /images/note/48/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/alert.png -------------------------------------------------------------------------------- /images/note/48/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/download.png -------------------------------------------------------------------------------- /images/note/48/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/help.png -------------------------------------------------------------------------------- /images/note/48/important.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/important.png -------------------------------------------------------------------------------- /images/note/48/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/info.png -------------------------------------------------------------------------------- /images/note/48/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/tip.png -------------------------------------------------------------------------------- /images/note/48/todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/note/48/todo.png -------------------------------------------------------------------------------- /images/toolbar/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/box.png -------------------------------------------------------------------------------- /images/toolbar/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/clear.png -------------------------------------------------------------------------------- /images/toolbar/column.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/column.png -------------------------------------------------------------------------------- /images/toolbar/em.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/em.png -------------------------------------------------------------------------------- /images/toolbar/hi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/hi.png -------------------------------------------------------------------------------- /images/toolbar/lo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/lo.png -------------------------------------------------------------------------------- /images/toolbar/picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selfthinker/dokuwiki_plugin_wrap/81450d7519e8f4da56e6fb2b8dcc98e1a01648ff/images/toolbar/picker.png -------------------------------------------------------------------------------- /lang/ar/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['column'] = 'عمود'; 9 | $lang['box'] = 'مربع متوسط بسيط'; 10 | $lang['info'] = 'مربع معلومات'; 11 | $lang['tip'] = 'مربع تلميح'; 12 | $lang['important'] = 'مربع هام'; 13 | $lang['alert'] = 'مربع التنبيه'; 14 | $lang['help'] = 'مربع تعليمات'; 15 | $lang['download'] = 'مربع التحميل'; 16 | $lang['lo'] = 'أقل أهمية'; 17 | -------------------------------------------------------------------------------- /lang/ar/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['restrictedClasses'] = 'تقييد استخدام البرنامج المساعد لهذه الفئات (مفصولة بفاصلة)'; 9 | $lang['restrictionType'] = 'تعين نوع القيد، إذا كانت الفئات المذكورة أعلاه يجب تضمينها أو استبعادها'; 10 | $lang['restrictionType_o_0'] = 'السماح لجميع الفئات باستثناء تلك المذكورة أعلاه'; 11 | $lang['restrictionType_o_1'] = 'تقييد للفئات المذكورة أعلاه فقط وليس غيرها'; 12 | -------------------------------------------------------------------------------- /lang/bg/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap приставка'; 9 | $lang['column'] = 'колони'; 10 | $lang['box'] = 'обикновено центрирано поле'; 11 | $lang['info'] = 'информационно поле'; 12 | $lang['tip'] = 'поле за съвет'; 13 | $lang['important'] = 'поле за важно съобщение'; 14 | $lang['alert'] = 'поле за предупреждение'; 15 | $lang['help'] = 'поле за съобщение за помощ'; 16 | $lang['download'] = 'поле за сваляне'; 17 | $lang['todo'] = 'поле за подсещане'; 18 | $lang['clear'] = 'премахване на параметъра float'; 19 | $lang['em'] = 'специално подчертано'; 20 | $lang['hi'] = 'акцентирано'; 21 | $lang['lo'] = 'маловажно'; 22 | -------------------------------------------------------------------------------- /lang/bg/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Кои имена на класове трябва да бъдат изключени от списъка с имена, които могат да бъдат разширени с префикс "wrap_"? 9 | Имената на класовете се изброяват в списък с разделител запетая.'; 10 | $lang['restrictedClasses'] = 'Ограничи приставката да използва само тези класове. Класовете се изброяват в списък с разделител запетая.'; 11 | $lang['restrictionType'] = 'тип на ограничението - специфицира дали изброените по-горе класове трябва да бъдат включени или изключени'; 12 | $lang['restrictionType_o_0'] = 'позволи всички класове с изключение на посочените по-горе'; 13 | $lang['restrictionType_o_1'] = 'ограничи единствено класовете изброени по-горе и никакви други'; 14 | $lang['syntaxDiv'] = 'Какъв синтаксис трябва да бъде използван в лентата с инструменти за block wraps?'; 15 | $lang['syntaxSpan'] = 'Какъв синтаксис трябва да бъде използван в лентата с инструменти за inline wraps?'; 16 | $lang['darkTpl'] = 'Оптимизирай цветовете за тъмните шаблони?'; 17 | -------------------------------------------------------------------------------- /lang/bn/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'মোড়ানো প্লাগইন'; 9 | $lang['column'] = 'স্তম্ভ'; 10 | $lang['box'] = 'সহজ কেন্দ্রিক বাক্স'; 11 | $lang['info'] = 'তথ্য বাক্স'; 12 | $lang['tip'] = 'টিপ বাক্স'; 13 | $lang['important'] = 'গুরুত্বপূর্ণ বাক্স'; 14 | $lang['alert'] = 'সতর্কতা বাক্স'; 15 | $lang['help'] = 'সাহায্য বাক্স'; 16 | $lang['download'] = 'ডাউনলোডের বাক্স'; 17 | $lang['todo'] = 'করণীয় বাক্স'; 18 | $lang['clear'] = 'স্পষ্ট floats'; 19 | $lang['em'] = 'বিশেষ করে জোর'; 20 | $lang['hi'] = 'হাইলাইট'; 21 | $lang['lo'] = 'কম গুরুত্বপূর্ণ'; 22 | -------------------------------------------------------------------------------- /lang/bn/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'যা (কমা দিয়ে পৃথক) শ্রেণীর নাম "wrap_" সঙ্গে অগ্রে যুক্ত হওয়া থেকে বাদ দেওয়া হবে?'; 9 | $lang['restrictedClasses'] = 'এইসব করতে প্লাগিন ব্যবহার সীমিত (কমা দিয়ে পৃথক করা) ক্লাস'; 10 | $lang['restrictionType'] = 'ক্লাস উপরে অন্তর্ভুক্ত বা বাদ দেওয়া হইবে যদি সীমাবদ্ধতা ধরন, নির্দিষ্ট করে'; 11 | $lang['restrictionType_o_0'] = 'উপরোক্ত জনকে ছাড়া সব শ্রেণীর অনুমতি'; 12 | $lang['restrictionType_o_1'] = 'শুধুমাত্র উপরোক্ত শ্রেণীর এবং কোন অন্যদের সীমিত'; 13 | $lang['syntaxDiv'] = 'কোন বাক্য গঠন ব্লক গোপন জন্য টুলবার জুতো ব্যবহার করা উচিত?'; 14 | $lang['syntaxSpan'] = 'কোন বাক্য গঠন ইনলাইন গোপন জন্য টুলবার জুতো ব্যবহার করা উচিত?'; 15 | -------------------------------------------------------------------------------- /lang/ckb/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'زیادکراوەی Wrap '; 9 | $lang['column'] = 'ستونەکان'; 10 | $lang['box'] = 'سندوقی ناوەندی سادە'; 11 | $lang['info'] = 'سندوقی زانیاری'; 12 | $lang['tip'] = 'سندوقی خاڵ'; 13 | $lang['important'] = 'سندوقی گرینگی'; 14 | $lang['alert'] = 'سندوقی هۆشدار'; 15 | $lang['help'] = 'سندوقی یارمەتی'; 16 | $lang['download'] = 'سندوقی داگرتن'; 17 | $lang['todo'] = 'سندوقی ئەنجامدان'; 18 | $lang['clear'] = 'سەرئاوکەوتن'; 19 | $lang['em'] = 'بەتایبەتی جەختی لەسەر'; 20 | $lang['hi'] = 'تیشکخراوە'; 21 | $lang['lo'] = 'کەمتر بەرچاو'; 22 | -------------------------------------------------------------------------------- /lang/ckb/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'کام ( بۆری لێکجیاکراوە ) ناوە چینایەتیەکان دەبێت دووربن لە پێشگر بوون بە " wrap_ " ؟ (* و ؟ پیتە جێگرەکان رێگەپێدراون)'; 9 | $lang['restrictedClasses'] = 'سنوردارکردنی بەکارهێنانی پێوەکراو بۆ ئەم پۆلانەی (بۆری جیاکراونەتەوە) (* و ؟ پیتە جێگرەکان رێگەپێدراون)'; 10 | $lang['restrictionType'] = 'جۆری سنووردان، دیاری دەکات ئەگەر ئەو پۆلانەی سەرەوە لە خۆدەبجێن یان دووردەکەونەوه'; 11 | $lang['restrictionType_o_0'] = 'ڕێگەدان بە هەموو چینەکان جگە لەوانەی سەرەوە'; 12 | $lang['restrictionType_o_1'] = 'سنووردارکردن بۆ تەنها ئەو چینانەی سەرەوە و هیچ ئەوانی تر'; 13 | $lang['syntaxDiv'] = 'کام داڕستان دەبێت بەکاربێت لە هەڵبژێری تووڵامراز بۆ داپۆشینی بلۆک؟ '; 14 | $lang['syntaxSpan'] = 'کام داڕستانی پێویستە بەکاربێت لە هەڵبژێری تووڵامراز بۆ لولکردنی ناوهێڵ؟'; 15 | $lang['darkTpl'] = 'گەشبینی ڕەنگەکان بۆ نموونە تاریکەکان؟'; 16 | $lang['emulatedHeadlines'] = '(ناونیشانە بەرجەستەکان بەکار بێنە؟ (بێ بەها'; 17 | -------------------------------------------------------------------------------- /lang/cs/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Jaroslav Lichtblau 8 | */ 9 | $lang['picker'] = 'Zásuvný modul Wrap'; 10 | $lang['column'] = 'sloupce'; 11 | $lang['box'] = 'jednoduchý vystředěný rámeček'; 12 | $lang['info'] = 'informační rámeček'; 13 | $lang['tip'] = 'rámeček s radou'; 14 | $lang['important'] = 'důležitý rámeček'; 15 | $lang['alert'] = 'výstražný rámeček'; 16 | $lang['help'] = 'pomocný rámeček'; 17 | $lang['download'] = 'rámeček s odkazem ke stažení'; 18 | $lang['todo'] = 'rámeček úkolu'; 19 | $lang['clear'] = 'oddělovač plovoucích rámečků'; 20 | $lang['em'] = 'zvláštně zdůrazněné'; 21 | $lang['hi'] = 'zvýrazněné'; 22 | $lang['lo'] = 'méně důležité'; 23 | -------------------------------------------------------------------------------- /lang/cs/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Jaroslav Lichtblau 8 | */ 9 | $lang['noPrefix'] = 'Která (čárkou oddělená) jména tříd nemají být označována předponou "wrap_"?'; 10 | $lang['restrictedClasses'] = 'Omezit použití zásuvného modulu na tyto (čárkou oddělené) třídy'; 11 | $lang['restrictionType'] = 'Typ omezení, rozhoduje jestli mají být výše uvedené třídy zahrnuty nebo vyřazeny'; 12 | $lang['restrictionType_o_0'] = 'Povolit všechny třídy kromě těch výše'; 13 | $lang['restrictionType_o_1'] = 'Omezit pouze na třídy výše a žádné jiné'; 14 | $lang['syntaxDiv'] = 'Jaká syntax má být použita ve výběru pro zarovnání do bloku? '; 15 | $lang['syntaxSpan'] = 'Jaká syntax má být použita ve výběru pro zarovnání v řádku? '; 16 | $lang['darkTpl'] = 'Optimalizovat barvy pro tmavý vzhled?'; 17 | $lang['emulatedHeadlines'] = 'Používat napodobeniny nadpisů? (zastaralé, pouze pro starší verze)'; 18 | -------------------------------------------------------------------------------- /lang/cy/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author diafol 8 | */ 9 | $lang['picker'] = 'Ategyn Wrap'; 10 | $lang['column'] = 'colofnau'; 11 | $lang['box'] = 'blwch syml wedi\'i ganoli'; 12 | $lang['info'] = 'blwch gwyb.'; 13 | $lang['tip'] = 'blwch awgrym'; 14 | $lang['important'] = 'blwch pwysig'; 15 | $lang['alert'] = 'blwch rhybudd'; 16 | $lang['help'] = 'blwch cyngor'; 17 | $lang['download'] = 'blwch lawrlwytho'; 18 | $lang['todo'] = 'blwch i-wneud'; 19 | $lang['clear'] = 'clirio \'floats\''; 20 | $lang['em'] = 'gyda phwyslais arbennig'; 21 | $lang['hi'] = 'aroleuedig'; 22 | $lang['lo'] = 'llai arwyddocaol'; 23 | -------------------------------------------------------------------------------- /lang/cy/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Pa enwau dosbarth (gwahanu gan goma) na ddylai derbyn y rhagddodiad "wrap_"?'; 9 | $lang['restrictedClasses'] = 'cyfyngu defnydd yr ategyn hwn i\'r dosbarthiadau (gwahanu gan goma) hyn'; 10 | $lang['restrictionType'] = 'math y cyfyngiad, yn dynodi os caiff y dosbarthiadau uchod eu cynnwys neu eu heithrio'; 11 | $lang['restrictionType_o_0'] = 'caniatáu pob dosbarth ond y rhai uchod'; 12 | $lang['restrictionType_o_1'] = 'cyfyngu i\'r dosbarthiadau uchod yn unig'; 13 | $lang['syntaxDiv'] = 'Pa gystrawen a ddylid defnyddio yn newisydd y bar offer ar gyfer wrapiau bloc?'; 14 | $lang['syntaxSpan'] = 'Pa gystrawen a ddylid defnyddio yn newisydd y bar offer ar gyfer wrapiau mewnlin?'; 15 | $lang['darkTpl'] = 'Optimeiddio lliwiau ar gyfer templedau tywyll?'; 16 | -------------------------------------------------------------------------------- /lang/da/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap Plugin'; 9 | $lang['column'] = 'række'; 10 | $lang['box'] = 'simpel centreret boks'; 11 | $lang['info'] = 'info boks'; 12 | $lang['tip'] = 'tip boks'; 13 | $lang['important'] = 'vigtig boks'; 14 | $lang['alert'] = 'alarm boks'; 15 | $lang['help'] = 'hjælp boks'; 16 | $lang['download'] = 'download boks'; 17 | $lang['todo'] = 'todo boks'; 18 | $lang['clear'] = 'ryd flydere'; 19 | $lang['em'] = 'specielt fremhævet'; 20 | $lang['hi'] = 'fremhævet'; 21 | $lang['lo'] = 'mindre vigtigt'; 22 | -------------------------------------------------------------------------------- /lang/da/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author soer9648 8 | */ 9 | $lang['noPrefix'] = 'Hvilke (kommaseparerede) klassenavne skal udelukkes fra at få præfikset "wrap_"?'; 10 | $lang['restrictedClasses'] = 'begræns brugen af udvidelse til følgende (kommaseparerede) klasser'; 11 | $lang['restrictionType'] = 'begrænsningstype, specificerer om ovenstående klasser skal inkluderes eller ekskluderes'; 12 | $lang['restrictionType_o_0'] = 'tillad alle klasser på nær de ovenstående'; 13 | $lang['restrictionType_o_1'] = 'begræns til ovenstående klasser og ingen andre'; 14 | $lang['syntaxDiv'] = 'Hvilken syntaks skal bruges i værktøjslinje vælgeren til block wraps?'; 15 | $lang['syntaxSpan'] = 'Hvilken syntaks skal bruges i værktøjslinje vælgeren til inline wraps?'; 16 | $lang['darkTpl'] = 'Optimer farver til mørke skabeloner?'; 17 | $lang['emulatedHeadlines'] = 'Brug emulerede overskrifter? (forældet)'; 18 | -------------------------------------------------------------------------------- /lang/de-informal/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap Plugin '; 9 | $lang['column'] = 'στήλες '; 10 | $lang['box'] = 'απλό εστιασμένο κουτί '; 11 | $lang['info'] = 'πλαίσιο πληροφοριών'; 12 | $lang['tip'] = 'πλαίσιο εντολών'; 13 | $lang['important'] = 'σημαντικό πλαίσιο'; 14 | $lang['alert'] = 'πλαίσιο (κουτί)ειδοποιήσεων'; 15 | $lang['help'] = 'πλαίσιο βοήθειας'; 16 | $lang['download'] = 'κατεβάστε πλαίσιο'; 17 | $lang['todo'] = 'πλαίσιο todo'; 18 | $lang['clear'] = 'σβήστε τις αμφισημίες'; 19 | $lang['em'] = 'με ιδιαίτερη έμφαση'; 20 | $lang['hi'] = 'φωτισμένο'; 21 | $lang['lo'] = 'λιγότερο σημαντικό '; 22 | -------------------------------------------------------------------------------- /lang/el/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Το οποίο (χωρισμένο με κόμμα) η κατηγορία των ονομάτων θα πρέπει να αποκλειστεί από το πρόσημο \'\'wrap\'\'_? (και ? με χρήση των μπαλαντέρ)'; 9 | $lang['restrictedClasses'] = 'Περιορίστε την χρήση του plugin σε αυτές τις κατηγορίες (που χωρίζονται με κόμμα) (* και ? με χρήση μπαλαντέρ ) '; 10 | $lang['restrictionType'] = 'Είδος περιορισμού, διευκρινίζει αν οι άνω κατηγορίες θα περιλαμβάνονται ή θα αποκλείονται'; 11 | $lang['restrictionType_o_0'] = 'Να επιτρέπονται όλες οι κατηγορίες εκτός από τις άνω'; 12 | $lang['restrictionType_o_1'] = 'Περιορίστε μόνο σε κατηγορίες ως άνω και όχι άλλες '; 13 | $lang['syntaxDiv'] = 'Ποια σύνταξη πρέπει να χρησιμοποιείται στην επιλογή μπάρας εργαλείων για περιεχόμενα μπλοκ?'; 14 | $lang['syntaxSpan'] = 'Ποια σύνταξη πρέπει να χρησιμοποιείται στην επιλογή μπάρας εργαλείων για τα περιεχόμενα στο εσωτερικό των γραμμών?'; 15 | $lang['darkTpl'] = 'Να βελτιστοποιούνται τα χρώματα για μοντέλα με σκούρο χρώμα?'; 16 | $lang['emulatedHeadlines'] = 'Να χρησιμοποιούνται περιττές επικεφαλίδες?'; 17 | -------------------------------------------------------------------------------- /lang/en/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap-kromaĵo'; 9 | $lang['column'] = 'kolumnoj'; 10 | $lang['box'] = 'simpla centrita skatolo'; 11 | $lang['info'] = 'inform-skatolo'; 12 | $lang['tip'] = 'konsil-skatolo'; 13 | $lang['important'] = 'grava skatolo'; 14 | $lang['alert'] = 'avert-skatolo'; 15 | $lang['help'] = 'help-skatolo'; 16 | $lang['download'] = 'elŝut-skatolo'; 17 | $lang['todo'] = 'farendaĵ-skatolo'; 18 | $lang['clear'] = 'liberigi la randojn'; 19 | $lang['em'] = 'aparte emfazita'; 20 | $lang['hi'] = 'markita'; 21 | $lang['lo'] = 'malpli grava'; 22 | -------------------------------------------------------------------------------- /lang/eo/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Kiuj (komo-disigitaj) klasnomoj estu ekskludataj de la prefikso "wrap_"?'; 9 | $lang['restrictedClasses'] = 'limigi la uzon de la kromaĵo al tiuj klasoj (komo-disigitaj)'; 10 | $lang['restrictionType'] = 'tipo de limigo (ĉu la supre menciitaj klasoj estu inkludataj aŭ ekskludataj?)'; 11 | $lang['restrictionType_o_0'] = 'permesi ĉiujn klasojn krom la menciitaj'; 12 | $lang['restrictionType_o_1'] = 'limigi al nur tiuj grupoj, neniuj aliaj'; 13 | $lang['syntaxDiv'] = 'Kiun sintakson uzi por blok-volvoj en la ilaro-elektilo?'; 14 | $lang['syntaxSpan'] = 'Kiun sintakson uzi por enliniaj volvoj en la ilaro-elektilo?'; 15 | -------------------------------------------------------------------------------- /lang/es/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap Plugin'; 9 | $lang['column'] = 'columnas'; 10 | $lang['box'] = 'caja simple centrada'; 11 | $lang['info'] = 'caja de información'; 12 | $lang['tip'] = 'caja de consejo'; 13 | $lang['important'] = 'caja importante'; 14 | $lang['alert'] = 'caja de alerta'; 15 | $lang['help'] = 'caja de ayuda'; 16 | $lang['download'] = 'caja de descarga'; 17 | $lang['todo'] = 'caja de TODO'; 18 | $lang['clear'] = 'limpiar float'; 19 | $lang['em'] = 'especialmente enfatizado'; 20 | $lang['hi'] = 'destacado'; 21 | $lang['lo'] = 'menos significativo'; 22 | -------------------------------------------------------------------------------- /lang/es/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Juan Asensio Sánchez 8 | * @author Óscar M. Lage 9 | */ 10 | $lang['noPrefix'] = '¿Qué nombres de clase (separados por comas) no deberían ser precedidos de "wrap_"? (caracteres comodines permitidos * e ?)'; 11 | $lang['restrictedClasses'] = 'restringir el uso de este plugin a estas clases (separadas por comas) (caracteres comodines permitidos * e ?)'; 12 | $lang['restrictionType'] = 'tipo de restricción, especifica si las clases anteriores serán incluidas o excluidas'; 13 | $lang['restrictionType_o_0'] = 'permitir todas las clases excepto las anteriores'; 14 | $lang['restrictionType_o_1'] = 'restringir a sólo las clases anteriores y no otras'; 15 | $lang['syntaxDiv'] = '¿Qué sintaxis debería ser usada en el selector de la barra de herramientas para los bloques "wrap"?'; 16 | $lang['syntaxSpan'] = '¿Qué sintaxis debería ser usada en el selector de la barra de herramientas para los "wrap" en linea?'; 17 | $lang['darkTpl'] = '¿Optimizar colores para plantillas oscuras?'; 18 | $lang['emulatedHeadlines'] = '¿Usar encabezados emulados? (obsoleto)'; 19 | -------------------------------------------------------------------------------- /lang/fa/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Sam01 8 | */ 9 | $lang['picker'] = 'افزونه قراردادن'; 10 | $lang['column'] = 'ستون‌ها'; 11 | $lang['box'] = 'جعبه محور ساده'; 12 | $lang['info'] = 'جعبه اطلاعات'; 13 | $lang['tip'] = 'جعبه نکته'; 14 | $lang['important'] = 'جعبه مهم'; 15 | $lang['alert'] = 'جعبه هشدار'; 16 | $lang['help'] = 'جعبه کمک'; 17 | $lang['download'] = 'جعبه دانلود'; 18 | $lang['todo'] = 'جعبه کاربردی'; 19 | $lang['clear'] = 'جعبه شناور'; 20 | $lang['em'] = 'تاکید مهم'; 21 | $lang['hi'] = 'برجسته'; 22 | $lang['lo'] = 'کم اهمیت'; 23 | -------------------------------------------------------------------------------- /lang/fa/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Sam01 8 | */ 9 | $lang['noPrefix'] = 'کدام نام‌های کلاس باید از پیشوند شدن با "wrap_" محروم شوند؟'; 10 | $lang['restrictedClasses'] = 'محدودکردن استفاده‌ی افزونه از این کلاس‌ها (جداکردن با کاما)'; 11 | $lang['restrictionType'] = 'نوع محدودیت، مشخص می‌کند که آیا کلاس‌های فوق گنجانده شوند و یا محروم شوند'; 12 | $lang['restrictionType_o_0'] = 'اجازه دادن برای طبقه‌بندی همه به جز بالایی‌ها'; 13 | $lang['restrictionType_o_1'] = 'محدودکردن به کلاس‌های بالا و نه دیگری'; 14 | $lang['syntaxDiv'] = 'کدام الگوی نگارشی باید استفاده شود در انتخابگر نوارابزار برای مسدودکردن قرارگرفته‌ها؟'; 15 | $lang['syntaxSpan'] = 'کدام الگوی نگارشی باید استفاده شود در انتخاب‌گر نوارابزار برای قرارگرفته‌های درون‌خطی؟'; 16 | $lang['darkTpl'] = 'تنظیم رنگ‌ها برای قالب‌های تیره؟'; 17 | $lang['emulatedHeadlines'] = 'از سرتیتر تطبیقی استفاده شود؟ (منسوخ)'; 18 | -------------------------------------------------------------------------------- /lang/fr/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author schplurtz 8 | */ 9 | $lang['picker'] = 'Extension Wrap'; 10 | $lang['column'] = 'colonnes'; 11 | $lang['box'] = 'bloc simple'; 12 | $lang['info'] = 'bloc information'; 13 | $lang['tip'] = 'bloc astuce'; 14 | $lang['important'] = 'bloc important'; 15 | $lang['alert'] = 'bloc alerte'; 16 | $lang['help'] = 'bloc aide'; 17 | $lang['download'] = 'bloc téléchargement'; 18 | $lang['todo'] = 'bloc à faire'; 19 | $lang['clear'] = 'rétablir le flux après un élément flottant'; 20 | $lang['em'] = 'particulièrement important'; 21 | $lang['hi'] = 'important'; 22 | $lang['lo'] = 'peu important'; 23 | -------------------------------------------------------------------------------- /lang/fr/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Laynee 8 | * @author Pietroni 9 | */ 10 | $lang['noPrefix'] = 'Quelles classes (séparées par une virgule) ne devraient pas être préfixées d\'un "wrap_" ?'; 11 | $lang['restrictedClasses'] = 'Restreindre l\'utilisation de cette extension à ces classes. (liste séparée par des virgules)'; 12 | $lang['restrictionType'] = 'Type de restriction. Indique s\'il faut inclure ou exclure les classes ci-dessus.'; 13 | $lang['restrictionType_o_0'] = 'Autoriser toutes les classes sauf celles ci-dessus.'; 14 | $lang['restrictionType_o_1'] = 'N\'autoriser que les classes ci dessus.'; 15 | $lang['syntaxDiv'] = 'Quelle syntaxe les boutons de la barre d\'outil doivent-ils générer pour les éléments blocs ?'; 16 | $lang['syntaxSpan'] = 'Quelle syntaxe les boutons de la barre d\'outil doivent-ils générer pour les éléments en ligne ?'; 17 | $lang['darkTpl'] = 'Optimiser les couleurs pour les thèmes sombres?'; 18 | $lang['emulatedHeadlines'] = 'Utiliser l\'émulation des titres ? (déprécié)'; 19 | -------------------------------------------------------------------------------- /lang/hr/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap dodatak'; 9 | $lang['column'] = 'kolone'; 10 | $lang['box'] = 'običan centrirani okvir'; 11 | $lang['info'] = 'info okvir'; 12 | $lang['tip'] = 'okvir savjet'; 13 | $lang['important'] = 'okvir važno'; 14 | $lang['alert'] = 'okvir upozorenja'; 15 | $lang['help'] = 'okvir pomoći'; 16 | $lang['download'] = 'okvir učitavanja'; 17 | $lang['todo'] = 'okvir preostalo'; 18 | $lang['clear'] = 'prazan okvir'; 19 | $lang['em'] = 'posebno naglašeni'; 20 | $lang['hi'] = 'istaknuti'; 21 | $lang['lo'] = 'manje bitan'; 22 | -------------------------------------------------------------------------------- /lang/hr/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Koja (zarezom odvojene) imena klasa trebaju ne trebaju biti s prefiksom "wrap_"? '; 9 | $lang['restrictedClasses'] = 'ograniči korištenje ovog dodatka na ove klase (zarezom odvojena lista)'; 10 | $lang['restrictionType'] = 'vrsta ograničenja, određuje da li gore navedene klase trebaju biti uključene ili isključene'; 11 | $lang['restrictionType_o_0'] = 'dozvoli sve klase osim gore navedenih'; 12 | $lang['restrictionType_o_1'] = 'dozvoli samo gore navedene klase'; 13 | $lang['syntaxDiv'] = 'Koja sintaksa treba biti korištena u alatnoj traci za omeđivanje bloka?'; 14 | $lang['syntaxSpan'] = 'Koja sintaksa treba biti korištena u alatnoj traci za omeđivanje teksta u liniji?'; 15 | $lang['darkTpl'] = 'Prilagoditi boje za tamne predloške?'; 16 | $lang['emulatedHeadlines'] = 'Koristi imitirana zaglavlja? (Obustavljeno)'; 17 | -------------------------------------------------------------------------------- /lang/hu/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap-csatoló'; 9 | $lang['column'] = 'oszlopok'; 10 | $lang['box'] = 'egyszerű, középre igazított doboz'; 11 | $lang['info'] = 'információs doboz'; 12 | $lang['tip'] = 'tippdoboz'; 13 | $lang['important'] = 'fontos doboz'; 14 | $lang['alert'] = 'figyelmeztető doboz'; 15 | $lang['help'] = 'súgódoboz'; 16 | $lang['download'] = 'letöltéshez doboz'; 17 | $lang['todo'] = 'teendőhöz doboz'; 18 | $lang['clear'] = 'float tiltása'; 19 | $lang['em'] = 'különösen hangsúlyos'; 20 | $lang['hi'] = 'kiemelt'; 21 | $lang['lo'] = 'kevésbé fontos'; 22 | -------------------------------------------------------------------------------- /lang/hu/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author DelD 8 | */ 9 | $lang['noPrefix'] = 'Mely (vesszővel elválasztott) osztályneveknek ne legyen "wrap_" előtagja?'; 10 | $lang['restrictedClasses'] = 'csatoló korlátozása ezekre a (vesszővel elválasztott) osztályokra'; 11 | $lang['restrictionType'] = 'korlátozás típusa, megadja, hogy a fenti osztályokat figyelembe vegye vagy se a csatoló'; 12 | $lang['restrictionType_o_0'] = 'minden osztály engedélyezése, kivéve a fentieket'; 13 | $lang['restrictionType_o_1'] = 'csak a fenti osztályok engedélyezése'; 14 | $lang['syntaxDiv'] = 'Milyen szintaxist használjunk a blokktípusú dobozokhoz az eszközsorban?'; 15 | $lang['syntaxSpan'] = 'Milyen szintaxist használjunk a soron belüli (inline) dobozokhoz az eszközsorban?'; 16 | $lang['darkTpl'] = 'Optimalizáljam a színeket sötét sablonokhoz?'; 17 | -------------------------------------------------------------------------------- /lang/it/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Giovanni 8 | * @author Torpedo 9 | */ 10 | $lang['picker'] = 'Plugin Wrap'; 11 | $lang['column'] = 'colonne'; 12 | $lang['box'] = 'box semplice centrato'; 13 | $lang['info'] = 'box informazione'; 14 | $lang['tip'] = 'box suggerimento'; 15 | $lang['important'] = 'box importante'; 16 | $lang['alert'] = 'box attenzione'; 17 | $lang['help'] = 'box aiuto'; 18 | $lang['download'] = 'box download'; 19 | $lang['todo'] = 'box cose da fare'; 20 | $lang['clear'] = 'elimina elementi flottanti'; 21 | $lang['em'] = 'enfatizzato speciale'; 22 | $lang['hi'] = 'evidenziato'; 23 | $lang['lo'] = 'meno importante'; 24 | -------------------------------------------------------------------------------- /lang/it/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Torpedo 8 | */ 9 | $lang['noPrefix'] = 'quali nomi di classi (elenco separato da virgole) non devono avere il prefisso "wrap_"?'; 10 | $lang['restrictedClasses'] = 'restringi l\'uso del plugin a queste classi (elenco separato da virgole)'; 11 | $lang['restrictionType'] = 'tipo di restrizione, specifica se le classi sopra devono essere incluse o escluse'; 12 | $lang['restrictionType_o_0'] = 'permetti tutte le classi tranne quelle sopra'; 13 | $lang['restrictionType_o_1'] = 'restringi solo alle classi sopra e a nessun\'altra'; 14 | $lang['syntaxDiv'] = 'Quale sintassi usare nella paletta degli strumenti per riquadri a blocchi?'; 15 | $lang['syntaxSpan'] = 'Quale sintassi usare nella paletta degli strumenti per riquadri in linea?'; 16 | $lang['darkTpl'] = 'Ottimizzare i colori per tema scuro?'; 17 | -------------------------------------------------------------------------------- /lang/ja/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap プラグイン'; 9 | $lang['column'] = '多段組み'; 10 | $lang['box'] = '中央配置枠'; 11 | $lang['info'] = '情報枠'; 12 | $lang['tip'] = 'ヒント枠'; 13 | $lang['important'] = '重要枠'; 14 | $lang['alert'] = '警告枠'; 15 | $lang['help'] = 'ヘルプ枠'; 16 | $lang['download'] = 'ダウンロード枠'; 17 | $lang['todo'] = 'TODO枠'; 18 | $lang['clear'] = '回り込み解除'; 19 | $lang['em'] = '特に強調'; 20 | $lang['hi'] = 'ハイライト表示'; 21 | $lang['lo'] = '非強調(薄色表示)'; 22 | -------------------------------------------------------------------------------- /lang/ja/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Satoshi Sahara 8 | * @author Hideaki SAWADA 9 | */ 10 | $lang['noPrefix'] = 'プレフィックス"wrap_" なしのCSSセレクタを例外的に適用するクラス名(カンマ区切り)'; 11 | $lang['restrictedClasses'] = '有効性をチェックするクラス名(カンマ区切り)'; 12 | $lang['restrictionType'] = '指定したクラスの扱い方'; 13 | $lang['restrictionType_o_0'] = '指定クラスを無効とし、他は有効とする'; 14 | $lang['restrictionType_o_1'] = '指定クラスのみを有効とする'; 15 | $lang['syntaxDiv'] = 'ツールバー使用時:ブロック型構文に使用するタグ名'; 16 | $lang['syntaxSpan'] = 'ツールバー使用時:インライン型構文に使用するタグ名'; 17 | $lang['darkTpl'] = '色の濃いテンプレート用に最適化しますか?'; 18 | $lang['emulatedHeadlines'] = 'エミュレートされた見出しを使う(非推奨)'; 19 | -------------------------------------------------------------------------------- /lang/ko/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap 플러그인'; 9 | $lang['column'] = '단'; 10 | $lang['box'] = '간단한 가운데 상자'; 11 | $lang['info'] = '정보 상자'; 12 | $lang['tip'] = '팁 상자'; 13 | $lang['important'] = '중요 상자'; 14 | $lang['alert'] = '경고 상자'; 15 | $lang['help'] = '도움말 상자'; 16 | $lang['download'] = '다운로드 상자'; 17 | $lang['todo'] = '할 일 상자'; 18 | $lang['clear'] = '플로트 지우기'; 19 | $lang['em'] = '특히 강조'; 20 | $lang['hi'] = '강조'; 21 | $lang['lo'] = '덜 중요함'; 22 | -------------------------------------------------------------------------------- /lang/ko/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Myeongjin 8 | */ 9 | $lang['noPrefix'] = '어떤 (쉼표로 구분된) 클래스 이름이 "wrap_" 접두어가 필요가 없습니까?'; 10 | $lang['restrictedClasses'] = '다음 (쉼표로 구분된) 클래스에 플러그인의 사용을 제한'; 11 | $lang['restrictionType'] = '제한 유형은 위의 클래스가 포함되거나 제외되어야 하는지 지정'; 12 | $lang['restrictionType_o_0'] = '위의 클래스를 제외하고 모든 클래스를 허용'; 13 | $lang['restrictionType_o_1'] = '위의 클래스만 허용하고 다른 클래스를 제한'; 14 | $lang['syntaxDiv'] = '어떤 문법이 블록 포장을 위해 도구 모음 선택기에서 사용되어야 합니까?'; 15 | $lang['syntaxSpan'] = '어떤 문법이 인라인 포장을 위해 도구 모음 선택기에서 사용되어야 합니까?'; 16 | $lang['darkTpl'] = '어두운 템플릿을 위해 색을 최적화하겠습니까?'; 17 | $lang['emulatedHeadlines'] = '에뮬레이션된 문단을 사용하시겠습니까? (비권장)'; 18 | -------------------------------------------------------------------------------- /lang/nl/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap Plugin'; 9 | $lang['column'] = 'kolommen'; 10 | $lang['box'] = 'simpele gecentreerde blok'; 11 | $lang['info'] = 'informatie blok'; 12 | $lang['tip'] = 'tip blok'; 13 | $lang['important'] = 'belangrijk blok'; 14 | $lang['alert'] = 'waarschuwingsblok'; 15 | $lang['help'] = 'helpblok'; 16 | $lang['download'] = 'downloadblok'; 17 | $lang['todo'] = 'tedoen blok'; 18 | $lang['clear'] = 'reset drijvende blokken (clear floats)'; 19 | $lang['em'] = 'bijzonder benadrukken'; 20 | $lang['hi'] = 'gemarkeerd'; 21 | $lang['lo'] = 'minder belangrijk'; 22 | -------------------------------------------------------------------------------- /lang/nl/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Johan Wijnker 8 | */ 9 | $lang['noPrefix'] = 'Welke (komma gescheiden) klassennamen moeten niet het voorvoegsel "wrap_" krijgen?'; 10 | $lang['restrictedClasses'] = 'Beperk het gebruik van de plugin tot deze (komma gescheiden) klassen'; 11 | $lang['restrictionType'] = 'beperkingstype, specificeer of de klassen hierboven wel of niet gebruikt mogen worden'; 12 | $lang['restrictionType_o_0'] = 'alle klassen zijn toegestaan, behalve de bovenstaande'; 13 | $lang['restrictionType_o_1'] = 'beperk de toegestane klassen tot de bovenstaande, en geen anderen'; 14 | $lang['syntaxDiv'] = 'Welke syntax moet worden gebruikt in het werkbalk-keuzemenu voor blok-wraps?'; 15 | $lang['syntaxSpan'] = 'Welke syntax moet worden gebruikt in het werkbalk-keuzemenu voor inline-wraps?'; 16 | $lang['darkTpl'] = 'Optimaliseer de kleuren voor donkere templates?'; 17 | $lang['emulatedHeadlines'] = 'Nagebootste kopteksten gebruiken (verouderd)'; 18 | -------------------------------------------------------------------------------- /lang/no/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Omhylningsplugin 9 | Omkransningsplugin'; 10 | $lang['column'] = 'kolonner'; 11 | $lang['box'] = 'enkel sentrert boks'; 12 | $lang['info'] = 'infoboks'; 13 | $lang['tip'] = 'tipsboks'; 14 | $lang['important'] = 'viktig boks'; 15 | $lang['alert'] = 'alarmboks'; 16 | $lang['help'] = 'hjelpeboks'; 17 | $lang['download'] = 'nedlastningsboks'; 18 | $lang['todo'] = 'gjøremålsboks'; 19 | $lang['clear'] = 'tøm floats'; 20 | $lang['em'] = 'spesielt fremhevet (singular) 21 | spesielt fremhevede (plural)'; 22 | $lang['hi'] = 'markert (singular) 23 | markerte (plural)'; 24 | $lang['lo'] = 'mindre viktig'; 25 | -------------------------------------------------------------------------------- /lang/no/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Hvilke klasser (adskilt med komma) bør eksluderes fra å ha prefiks "wrap_"?'; 9 | $lang['restrictedClasses'] = 'begrens bruk av plugin til klasser adskilt med komma'; 10 | $lang['restrictionType'] = 'restriksjonstype, spesifiserer om de ovenforstående klassene skal inkluderes eller ekskluderes'; 11 | $lang['restrictionType_o_0'] = 'vis alle klasser bortsett fra de ovenforstående'; 12 | $lang['restrictionType_o_1'] = 'begrens til kun ovenforstående klasser og ingen fler'; 13 | $lang['syntaxDiv'] = 'Hvilken syntaks bør brukes i verktøylinjen valg for blokkomkransning?'; 14 | $lang['syntaxSpan'] = 'Hvilken syntaks bør brukes i verktøylinjen valg for omkransning på en linje?'; 15 | $lang['darkTpl'] = 'Optimer farger for mørke maler?'; 16 | -------------------------------------------------------------------------------- /lang/pl/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Bartek S 8 | */ 9 | $lang['picker'] = 'Wtyczka Wrap'; 10 | $lang['column'] = 'kolumny'; 11 | $lang['box'] = 'wyśrodkowane proste pole'; 12 | $lang['info'] = 'pole informacyjne'; 13 | $lang['tip'] = 'pole sugestii'; 14 | $lang['important'] = 'ważne pole'; 15 | $lang['alert'] = 'pole ostrzeżenia'; 16 | $lang['help'] = 'pole pomocy'; 17 | $lang['download'] = 'pole pobierania'; 18 | $lang['todo'] = 'pole todo'; 19 | $lang['clear'] = 'wyczyść elementy pływające'; 20 | $lang['em'] = 'szczególnie podkreślone'; 21 | $lang['hi'] = 'podświetlone'; 22 | $lang['lo'] = 'mniej znaczące'; 23 | -------------------------------------------------------------------------------- /lang/pl/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Bartek S 8 | */ 9 | $lang['noPrefix'] = 'Które (oddzielone przecinkami) nazwy klas powinny być wykluczone z przedrostka „wrap_”? (dozwolone symbole wieloznaczne * i ?)'; 10 | $lang['restrictedClasses'] = 'Ogranicz użycie wtyczki do tych (rozdzielonych przecinkami) klas (dozwolone symbole wieloznaczne * i ?)'; 11 | $lang['restrictionType'] = 'Typ ograniczenia, określa, czy powyższe klasy mają być uwzględnione, czy wykluczone'; 12 | $lang['restrictionType_o_0'] = 'Zezwalaj na wszystkie klasy z wyjątkiem powyższych'; 13 | $lang['restrictionType_o_1'] = 'Ogranicz tylko do powyższych klas i żadnych innych'; 14 | $lang['syntaxDiv'] = 'Jakiej składni należy użyć w selektorze paska narzędzi do zawijania bloków?'; 15 | $lang['syntaxSpan'] = 'Jakiej składni należy użyć w selektorze paska narzędzi do zawijania w wierszu?'; 16 | $lang['darkTpl'] = 'Zoptymalizować kolory pod kątem ciemnych szablonów?'; 17 | $lang['emulatedHeadlines'] = 'Używać emulowanych nagłówków? (przestarzałe)'; 18 | -------------------------------------------------------------------------------- /lang/pt-br/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Fábio Nogueira 8 | */ 9 | $lang['picker'] = 'Plugin Wrap'; 10 | $lang['column'] = 'colunas'; 11 | $lang['box'] = 'caixa centralizada simples'; 12 | $lang['info'] = 'caixa de informação'; 13 | $lang['tip'] = 'caixa de sugestão'; 14 | $lang['important'] = 'caixa importante'; 15 | $lang['alert'] = 'caixa de alerta'; 16 | $lang['help'] = 'caixa de ajuda'; 17 | $lang['download'] = 'caixa de download'; 18 | $lang['todo'] = 'caixa de tarefas a fazer'; 19 | $lang['clear'] = 'limpar'; 20 | $lang['em'] = 'especialmente enfatizado'; 21 | $lang['hi'] = 'enfatizado'; 22 | $lang['lo'] = 'menos significativo'; 23 | -------------------------------------------------------------------------------- /lang/pt-br/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Frederico Gonçalves Guimarães 8 | * @author Sérgio Motta 9 | * @author Juliano Marconi Lanigra 10 | * @author Flaudísio Tolentino 11 | * @author Fábio Nogueira 12 | */ 13 | $lang['noPrefix'] = 'Quais classes (separadas por vírgula) deverão ser excluídas de receber o prefixo "wrap_"?'; 14 | $lang['restrictedClasses'] = 'Restringir uso do plugin para essas classes (separadas por vírgula)'; 15 | $lang['restrictionType'] = 'Tipo de restrição, especifica se as classes acima deveriam ser incluídas ou excluídas'; 16 | $lang['restrictionType_o_0'] = 'Permitir todas as classes exceto as acima'; 17 | $lang['restrictionType_o_1'] = 'Restringir somente às classes acima e nenhuma outra'; 18 | $lang['syntaxDiv'] = 'Qual a sintaxe que deve ser utilizada no selecionador de barra de ferramentas para wraps em bloco?'; 19 | $lang['syntaxSpan'] = 'Qual a sintaxe que deve ser utilizada no selecionador de barra de ferramentas para wraps em linha?'; 20 | $lang['darkTpl'] = 'Otimizar cores para templates escuros?'; 21 | $lang['emulatedHeadlines'] = 'Usar cabeçalhos emulados? (descontinuado)'; 22 | -------------------------------------------------------------------------------- /lang/pt/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Extensão de encapsulamento'; 9 | $lang['column'] = 'colunas'; 10 | $lang['box'] = 'simples caixa centralizada'; 11 | $lang['info'] = 'caixa de informações'; 12 | $lang['tip'] = 'caixa de dicas'; 13 | $lang['important'] = 'caixa importante'; 14 | $lang['alert'] = 'caixa de alerta'; 15 | $lang['help'] = 'caixa de ajuda'; 16 | $lang['download'] = 'caixa de transferência'; 17 | $lang['todo'] = 'caixa \'para fazer\''; 18 | $lang['clear'] = 'limpar números racionais'; 19 | $lang['em'] = 'com ênfase especial'; 20 | $lang['hi'] = 'destacado'; 21 | $lang['lo'] = 'menos significante'; 22 | -------------------------------------------------------------------------------- /lang/pt/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Quais nomes de classes (separados por vírgulas) devem ser excluídos de serem prefixados com "wrap_"? (* e ? caracteres coringa aceitos)'; 9 | $lang['restrictedClasses'] = 'Restringir uso da extensão para essas classes (separadas por vírgula) (* e ? caracteres coringa aceitos)'; 10 | $lang['restrictionType'] = 'Tipo de restrição, especifica se as classes acima devem ser incluídas ou excluídas'; 11 | $lang['restrictionType_o_0'] = 'Permitir todas as classes, exceto as acima'; 12 | $lang['restrictionType_o_1'] = 'Restringir para apenas as classes acima e nenhuma outra'; 13 | $lang['syntaxDiv'] = 'Qual sintaxe deve ser usada no seletor da barra de ferramentas para encapsulamento de bloco?'; 14 | $lang['syntaxSpan'] = 'Qual sintaxe deve ser usada no seletor da barra de ferramentas para encapsulamento em linha?'; 15 | $lang['darkTpl'] = 'Otimizar cores para temas escuros?'; 16 | $lang['emulatedHeadlines'] = 'Usar cabeçalhos emulados? (descontinuado)'; 17 | -------------------------------------------------------------------------------- /lang/ru/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Ilya Rozhkov 8 | */ 9 | $lang['picker'] = 'Wrap'; 10 | $lang['column'] = 'колонки'; 11 | $lang['box'] = 'простой центрированный блок'; 12 | $lang['info'] = 'блок «Информация»'; 13 | $lang['tip'] = 'блок «Подсказка»'; 14 | $lang['important'] = 'блок «Важно»'; 15 | $lang['alert'] = 'блок «Тревога»'; 16 | $lang['help'] = 'блок «Справка»'; 17 | $lang['download'] = 'блок «Скачивание»'; 18 | $lang['todo'] = 'блок «Список задач»'; 19 | $lang['clear'] = 'очистить float’ы'; 20 | $lang['em'] = 'пометить важным'; 21 | $lang['hi'] = 'выделить (маркер)'; 22 | $lang['lo'] = 'пометить неважным'; 23 | -------------------------------------------------------------------------------- /lang/ru/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Ilya Rozhkov 8 | * @author Rouslan 9 | */ 10 | $lang['noPrefix'] = 'Имена каких классов не должны начинаться с префикса wrap_? (перечислите через запятую; символы * и ? разрешены)'; 11 | $lang['restrictedClasses'] = 'Классы плагина, которые нельзя использовать (перечислите через запятую; символы * и ? разрешены)'; 12 | $lang['restrictionType'] = 'Тип ограничения, указывающий, должны ли быть включены или исключены классы выше'; 13 | $lang['restrictionType_o_0'] = 'разрешить все, за исключением классов, указанных выше'; 14 | $lang['restrictionType_o_1'] = 'ограничить только классами, указанными выше'; 15 | $lang['syntaxDiv'] = 'Какой синтаксис использовать для создания блоков и примечаний?'; 16 | $lang['syntaxSpan'] = 'Какой синтаксис использовать для создания блоков выделения внутри текста?'; 17 | $lang['darkTpl'] = 'Оптимизировать цвета для тёмных тем оформления (шаблонов)?'; 18 | $lang['emulatedHeadlines'] = 'Использовать эмуляцию заголовков? (устаревшее)'; 19 | -------------------------------------------------------------------------------- /lang/sk/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap Plugin'; 9 | $lang['column'] = 'stĺpec'; 10 | $lang['em'] = 'zvlášť zdôraznený'; 11 | $lang['hi'] = 'zvýraznený'; 12 | $lang['lo'] = 'menej významný'; 13 | -------------------------------------------------------------------------------- /lang/sk/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Ktoré (čiarkou oddelené) mená tried by mali byť vynechané pri použití predpony "wrap_"?'; 9 | $lang['restrictedClasses'] = 'Obmedzenie použitia pluginu na tieto (čiarkou oddelené) triedy'; 10 | $lang['restrictionType'] = 'Typ obmedzenia, špecifikuje, či triedy uvedené vyššie maju byť zahrnuté alebo vynechané'; 11 | $lang['restrictionType_o_0'] = 'povolenie pre všetky triedy okrem uvedených vyššie'; 12 | $lang['restrictionType_o_1'] = 'obmedzenie len na triedy uvedené vyššie a žiadne iné'; 13 | -------------------------------------------------------------------------------- /lang/sr/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Прикључак за преламање'; 9 | $lang['column'] = 'колоне'; 10 | $lang['box'] = 'једноставна кутија на средини'; 11 | $lang['info'] = 'инфо кутија'; 12 | $lang['tip'] = 'кутија са саветима'; 13 | $lang['important'] = 'важна кутија'; 14 | $lang['alert'] = 'кутија са узбуном'; 15 | $lang['help'] = 'кутија за испомоћ'; 16 | $lang['download'] = 'кутија за преузимање'; 17 | $lang['todo'] = 'кутија са задацима'; 18 | $lang['clear'] = 'очисти плутајуће'; 19 | $lang['em'] = 'нарочито назначено'; 20 | $lang['hi'] = 'означено'; 21 | $lang['lo'] = 'мање важно'; 22 | -------------------------------------------------------------------------------- /lang/sr/settings.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Марко М. Костић 8 | */ 9 | $lang['noPrefix'] = 'Која (зарезима одвојена) имена класа треба изузети од додавања префикса "wrap_"?'; 10 | $lang['restrictedClasses'] = 'ограничи употребу прикључна на ове (зарезима одвојене) класе'; 11 | $lang['restrictionType'] = 'врста ограничења, наводи да ли класе изнад треба укључити или искључити'; 12 | $lang['restrictionType_o_0'] = 'дозволи све класе осим оних изнад'; 13 | $lang['restrictionType_o_1'] = 'ограничи само на класе изнад и ниједну више'; 14 | $lang['syntaxDiv'] = 'Коју синтаксу користити у бирачу алатне траке за преламања блокова?'; 15 | $lang['syntaxSpan'] = 'Коју синтаксу користити у бирачу алатне траке за преламања у линији?'; 16 | $lang['darkTpl'] = 'Оптимизовати боје за тамне шаблоне?'; 17 | $lang['emulatedHeadlines'] = 'Користи емулирана заглавља? (застарело)'; 18 | -------------------------------------------------------------------------------- /lang/sv/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Wrap-plugin'; 9 | $lang['column'] = 'kolumner'; 10 | $lang['info'] = 'infolåda'; 11 | $lang['tip'] = 'tipslåda'; 12 | $lang['important'] = 'viktigt-box'; 13 | $lang['help'] = 'hjälp-box'; 14 | $lang['download'] = 'nedladdningsbox'; 15 | $lang['todo'] = 'att böra-box'; 16 | $lang['hi'] = 'förstärkt'; 17 | $lang['lo'] = 'mindre betydelsefullt'; 18 | -------------------------------------------------------------------------------- /lang/sv/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Vilka (komma-separerade) class-namn ska undantas från att få prefix "wrap_"?'; 9 | $lang['restrictedClasses'] = 'begränsa plugin-användningen till dessa (komma-separerade) class '; 10 | $lang['darkTpl'] = 'Optimera färger för mörkt templat?'; 11 | -------------------------------------------------------------------------------- /lang/tr/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author İlker R. Kapaç 8 | */ 9 | $lang['picker'] = 'Paket Eklentisi'; 10 | $lang['column'] = 'sütunlar'; 11 | $lang['box'] = 'ortalanmış basit kutu'; 12 | $lang['info'] = 'bilgi kutusu'; 13 | $lang['tip'] = 'ipucu kutusu'; 14 | $lang['important'] = 'önemli kutusu'; 15 | $lang['alert'] = 'ikaz kutusu'; 16 | $lang['help'] = 'yardım kutusu'; 17 | $lang['download'] = 'indirme kutusu'; 18 | $lang['todo'] = 'yapılacaklar kutusu'; 19 | $lang['clear'] = 'boşlukları temizle'; 20 | $lang['em'] = 'özellikle vurgulanmış'; 21 | $lang['hi'] = 'vurgulanmış'; 22 | $lang['lo'] = 'daha az önemli'; 23 | -------------------------------------------------------------------------------- /lang/tr/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Hangi sınıf isimleri, (virgülle ayrılmış) önüne "wrap_" öneki almaktan hariç tutulsun?'; 9 | $lang['restrictedClasses'] = 'eklentinin kullanımını bu sınıflarla (virgülle ayrılmış) sınırla'; 10 | $lang['restrictionType'] = 'kısıtlama tipi, üstteki sınıfların dalil mi edileceklerini yoksa hariç mi tutulacaklarını belirler.'; 11 | $lang['restrictionType_o_0'] = 'üsttekiler hariç tüm sınıflara izin ver'; 12 | $lang['restrictionType_o_1'] = 'sadece üstteki sınıflarla sınırla, başkasına izin verme'; 13 | $lang['syntaxDiv'] = 'Blok paketi için araç çubuğunda hangi sözdizimi kullanılsın?'; 14 | $lang['syntaxSpan'] = 'Satır içi paketi için araç çubuğunda hangi sözdizimi kullanılsın?'; 15 | $lang['darkTpl'] = 'Karanlık şablonlar için renkler iyileştirilsin mi?'; 16 | -------------------------------------------------------------------------------- /lang/uk/lang.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['picker'] = 'Плагін Оформлення'; 9 | $lang['column'] = 'колонки'; 10 | $lang['box'] = 'простий блок по центру'; 11 | $lang['info'] = 'інформаційний блок'; 12 | $lang['tip'] = 'блок з порадою'; 13 | $lang['important'] = 'важливий блок'; 14 | $lang['alert'] = 'блок із застереженням'; 15 | $lang['help'] = 'блок допомоги'; 16 | $lang['download'] = 'блок завантаження'; 17 | $lang['todo'] = 'блок завдання'; 18 | $lang['em'] = 'особливо підкреслено'; 19 | $lang['hi'] = 'виокремити'; 20 | $lang['lo'] = 'менш значущий'; 21 | -------------------------------------------------------------------------------- /lang/uk/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['restrictionType_o_0'] = 'Дозволити всі класи, крім вищезазначених'; 9 | $lang['darkTpl'] = 'Оптимізувати кольори до темної гами оформлення?'; 10 | $lang['emulatedHeadlines'] = 'Імітувати заголовки? (не підтримується)'; 11 | -------------------------------------------------------------------------------- /lang/vi/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Thien Hau 8 | */ 9 | $lang['picker'] = 'Tiện ích plugin cho Wrap'; 10 | $lang['column'] = 'cột'; 11 | $lang['box'] = 'hộp đơn giản căn giữa'; 12 | $lang['info'] = 'hộp thông tin'; 13 | $lang['tip'] = 'hộp mẹo'; 14 | $lang['important'] = 'hộp quan trọng'; 15 | $lang['alert'] = 'hộp cảnh báo'; 16 | $lang['help'] = 'hộp trợ giúp'; 17 | $lang['download'] = 'hộp tải về'; 18 | $lang['todo'] = 'hộp cần làm'; 19 | $lang['clear'] = 'xóa nổi'; 20 | $lang['em'] = 'đặc biệt nhấn mạnh'; 21 | $lang['hi'] = 'đặc biệt nhấn mạnh'; 22 | $lang['lo'] = 'ít nghĩa quan trọng'; 23 | -------------------------------------------------------------------------------- /lang/vi/settings.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $lang['noPrefix'] = 'Những tên lớp (được phân tách bằng dấu phẩy) nên được loại trừ khỏi tiền tố với "wrap_"? ( * và ?)'; 9 | $lang['restrictedClasses'] = 'Hạn chế sử dụng plugin đối với các lớp (được phân tách bằng dấu phẩy) (được phép ký tự đại diện * và ?)'; 10 | $lang['restrictionType'] = 'Loại hạn chế, chỉ định nếu các lớp ở trên sẽ được bao gồm hoặc loại trừ'; 11 | $lang['restrictionType_o_0'] = 'Cho phép tất cả các lớp trừ những lớp trên'; 12 | $lang['restrictionType_o_1'] = 'Chỉ giới hạn các lớp ở trên và không có lớp nào khác'; 13 | $lang['syntaxDiv'] = 'Cú pháp nào sẽ được sử dụng trong trình chọn thanh công cụ cho wrap khối?'; 14 | $lang['syntaxSpan'] = 'Cú pháp nào nên được sử dụng trong trình chọn thanh công cụ cho wrap nội tuyến?'; 15 | $lang['darkTpl'] = 'Tối ưu hóa màu sắc cho các chủ đề tối?'; 16 | $lang['emulatedHeadlines'] = 'Sử dụng đầu đề mô phỏng? (lỗi thời)'; 17 | -------------------------------------------------------------------------------- /lang/zh-tw/lang.php: -------------------------------------------------------------------------------- 1 | 7 | * @author lainme 8 | * @author maie 9 | */ 10 | $lang['noPrefix'] = '哪些CSS类不需要加上“wrap_"前缀?(逗号分隔)'; 11 | $lang['restrictedClasses'] = '将插件的使用限制应用到这些类(逗号分隔)'; 12 | $lang['restrictionType'] = '限制类型,指定上述类应该被包含或排除'; 13 | $lang['restrictionType_o_0'] = '允许除上述类之外的所有类'; 14 | $lang['restrictionType_o_1'] = '仅允许上述类'; 15 | $lang['syntaxDiv'] = '在编辑工具栏的选择器中应对块级元素使用何种语法?'; 16 | $lang['syntaxSpan'] = '在编辑工具栏的选择器中应对行内元素使用何种语法?'; 17 | $lang['darkTpl'] = '优化黑模板的颜色?'; 18 | $lang['emulatedHeadlines'] = '使用模拟标题?(不推荐)'; 19 | -------------------------------------------------------------------------------- /pdf.less: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | Styles used in PDFs by the DW2PDF plugin (in addition to all.css, and 3 | the DW2PDF plugin also includes style.css via the 'usestyles' option) 4 | ********************************************************************/ 5 | 6 | @import 'print_or_pdf.less'; 7 | 8 | .dokuwiki { 9 | 10 | /*____________ only print ____________*/ 11 | /* due to including style.css, these need to be overwritten again */ 12 | 13 | div.wrap_onlyprint { 14 | display: block; 15 | } 16 | span.wrap_onlyprint { 17 | display: inline; 18 | } 19 | 20 | } /* /.dokuwiki */ 21 | -------------------------------------------------------------------------------- /plugin.info.txt: -------------------------------------------------------------------------------- 1 | base wrap 2 | author Anika Henke 3 | email anika@selfthinker.org 4 | date 2023-08-13 5 | name Wrap Plugin 6 | desc Universal plugin which combines functionalities of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction. 7 | url https://www.dokuwiki.org/plugin:wrap 8 | #syntax See example.txt 9 | -------------------------------------------------------------------------------- /print.less: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | Print Styles for the Wrap Plugin (additional to all.css) 3 | ********************************************************************/ 4 | 5 | @import 'print_or_pdf.less'; 6 | 7 | .dokuwiki { 8 | 9 | /* boxes and notes with icons 10 | ********************************************************************/ 11 | 12 | div.wrap_box, 13 | div.wrap_danger, div.wrap_warning, div.wrap_caution, div.wrap_notice, div.wrap_safety, 14 | div.wrap_info, div.wrap_important, div.wrap_alert, div.wrap_tip, div.wrap_help, div.wrap_todo, div.wrap_download { 15 | border: 2px solid #999; 16 | padding: 1em 1em .5em; 17 | margin-bottom: 1.5em; 18 | } 19 | span.wrap_box, 20 | span.wrap_danger, span.wrap_warning, span.wrap_caution, span.wrap_notice, span.wrap_safety, 21 | span.wrap_info, span.wrap_important, span.wrap_alert, span.wrap_tip, span.wrap_help, span.wrap_todo, span.wrap_download { 22 | border: 1px solid #999; 23 | padding: 0 .3em; 24 | } 25 | 26 | 27 | /* mark 28 | ********************************************************************/ 29 | 30 | .wrap_hi { 31 | border: 1px solid #999; 32 | } 33 | 34 | 35 | /* miscellaneous 36 | ********************************************************************/ 37 | 38 | /*____________ spoiler ____________*/ 39 | 40 | .wrap_spoiler { 41 | visibility: hidden; 42 | } 43 | 44 | 45 | } /* /.dokuwiki */ 46 | -------------------------------------------------------------------------------- /print_or_pdf.less: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | Styles shared between print.css and pdf.css 3 | ********************************************************************/ 4 | 5 | .dokuwiki { 6 | 7 | /* miscellaneous 8 | ********************************************************************/ 9 | 10 | /*____________ pagebreak ____________*/ 11 | 12 | .wrap_pagebreak { 13 | break-after: page; /* CSS 3 */ 14 | page-break-after: always; /* CSS 2.1 */ 15 | } 16 | 17 | /*____________ avoid page break ____________*/ 18 | /* not yet supported by most browsers */ 19 | 20 | .wrap_nopagebreak { 21 | break-inside: avoid; /* CSS 3 */ 22 | page-break-inside: avoid; /* CSS 2.1 */ 23 | } 24 | 25 | /*____________ no print ____________*/ 26 | 27 | .wrap_noprint { 28 | display: none; 29 | } 30 | 31 | } /* /.dokuwiki */ 32 | -------------------------------------------------------------------------------- /style.less: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | Screen Styles for the Wrap Plugin (additional to all.css) 3 | ********************************************************************/ 4 | 5 | .dokuwiki { 6 | 7 | /* box 8 | ********************************************************************/ 9 | 10 | .wrap_box { 11 | background: @ini_background_alt; 12 | color: @ini_text; 13 | } 14 | div.wrap_box, 15 | div.wrap_danger, 16 | div.wrap_warning, 17 | div.wrap_caution, 18 | div.wrap_notice, 19 | div.wrap_safety { 20 | padding: 1em 1em .5em; 21 | margin-bottom: 1.5em; 22 | overflow: hidden; 23 | } 24 | span.wrap_box, 25 | span.wrap_danger, 26 | span.wrap_warning, 27 | span.wrap_caution, 28 | span.wrap_notice, 29 | span.wrap_safety { 30 | padding: 0 .3em; 31 | } 32 | 33 | /*____________ notes with icons ____________*/ 34 | 35 | /* general styles for all note divs */ 36 | div.wrap_info, 37 | div.wrap_important, 38 | div.wrap_alert, 39 | div.wrap_tip, 40 | div.wrap_help, 41 | div.wrap_todo, 42 | div.wrap_download { 43 | padding: 1em 1em .5em 70px; 44 | margin-bottom: 1.5em; 45 | min-height: 68px; 46 | background-position: 10px 50%; 47 | background-repeat: no-repeat; 48 | color: inherit; 49 | overflow: hidden; 50 | } 51 | /* general styles for all note spans */ 52 | span.wrap_info, 53 | span.wrap_important, 54 | span.wrap_alert, 55 | span.wrap_tip, 56 | span.wrap_help, 57 | span.wrap_todo, 58 | span.wrap_download { 59 | padding: 0 2px 0 20px; 60 | min-height: 20px; 61 | background-position: 2px 50%; 62 | background-repeat: no-repeat; 63 | color: inherit; 64 | } 65 | 66 | /* sorry for icons glued to the right side, but there is currently no way 67 | to make this look good without adjusting the images themselves */ 68 | [dir=rtl] div.wrap_info, 69 | [dir=rtl] div.wrap_important, 70 | [dir=rtl] div.wrap_alert, 71 | [dir=rtl] div.wrap_tip, 72 | [dir=rtl] div.wrap_help, 73 | [dir=rtl] div.wrap_todo, 74 | [dir=rtl] div.wrap_download { 75 | padding: 1em 60px .5em 1em; 76 | background-position: right 50%; 77 | } 78 | [dir=rtl] span.wrap_info, 79 | [dir=rtl] span.wrap_important, 80 | [dir=rtl] span.wrap_alert, 81 | [dir=rtl] span.wrap_tip, 82 | [dir=rtl] span.wrap_help, 83 | [dir=rtl] span.wrap_todo, 84 | [dir=rtl] span.wrap_download { 85 | padding: 0 18px 0 2px; 86 | background-position: right 50%; 87 | } 88 | 89 | /*____________ info ____________*/ 90 | .wrap_info { background-color: #d1d7df; } 91 | .wrap__dark.wrap_info { background-color: #343e4a; } 92 | div.wrap_info { background-image: url(images/note/48/info.png); } 93 | span.wrap_info { background-image: url(images/note/16/info.png); } 94 | 95 | /*____________ important ____________*/ 96 | .wrap_important { background-color: #ffd39f; } 97 | .wrap__dark.wrap_important { background-color: #6c3b00; } 98 | div.wrap_important { background-image: url(images/note/48/important.png); } 99 | span.wrap_important { background-image: url(images/note/16/important.png); } 100 | 101 | /*____________ alert ____________*/ 102 | .wrap_alert { background-color: #ffbcaf; } 103 | .wrap__dark.wrap_alert { background-color: #6b1100; } 104 | div.wrap_alert { background-image: url(images/note/48/alert.png); } 105 | span.wrap_alert { background-image: url(images/note/16/alert.png); } 106 | 107 | /*____________ tip ____________*/ 108 | .wrap_tip { background-color: #fff79f; } 109 | .wrap__dark.wrap_tip { background-color: #4a4400; } 110 | div.wrap_tip { background-image: url(images/note/48/tip.png); } 111 | span.wrap_tip { background-image: url(images/note/16/tip.png); } 112 | 113 | /*____________ help ____________*/ 114 | .wrap_help { background-color: #dcc2ef; } 115 | .wrap__dark.wrap_help { background-color: #3c1757; } 116 | div.wrap_help { background-image: url(images/note/48/help.png); } 117 | span.wrap_help { background-image: url(images/note/16/help.png); } 118 | 119 | /*____________ todo ____________*/ 120 | .wrap_todo { background-color: #c2efdd; } 121 | .wrap__dark.wrap_todo { background-color: #17573e; } 122 | div.wrap_todo { background-image: url(images/note/48/todo.png); } 123 | span.wrap_todo { background-image: url(images/note/16/todo.png); } 124 | 125 | /*____________ download ____________*/ 126 | .wrap_download { background-color: #d6efc2; } 127 | .wrap__dark.wrap_download { background-color: #345717; } 128 | div.wrap_download { background-image: url(images/note/48/download.png); } 129 | span.wrap_download { background-image: url(images/note/16/download.png); } 130 | 131 | 132 | /*____________ safety notes ____________*/ 133 | 134 | .wrap_danger { 135 | background-color: #c00; 136 | color: #fff; 137 | } 138 | .wrap_warning { 139 | background-color: #f60; 140 | color: #000; 141 | } 142 | .wrap_caution { 143 | background-color: #ff0; 144 | color: #000; 145 | } 146 | .wrap_notice { 147 | background-color: #06f; 148 | color: #fff; 149 | } 150 | .wrap_safety { 151 | background-color: #090; 152 | color: #fff; 153 | } 154 | 155 | .wrap_danger *, 156 | .wrap_warning *, 157 | .wrap_caution *, 158 | .wrap_notice *, 159 | .wrap_safety * { 160 | color: inherit !important; 161 | } 162 | 163 | 164 | /* mark 165 | ********************************************************************/ 166 | 167 | .wrap_hi { 168 | background-color: #ff9; 169 | overflow: hidden; 170 | } 171 | .wrap__dark.wrap_hi { 172 | background-color: #4e4e0d; 173 | } 174 | 175 | 176 | /* miscellaneous 177 | ********************************************************************/ 178 | 179 | /*____________ spoiler ____________*/ 180 | 181 | .wrap_spoiler { 182 | background-color: @ini_background !important; 183 | color: @ini_background !important; 184 | border: 1px dotted red; 185 | } 186 | 187 | /*____________ only print ____________*/ 188 | 189 | .wrap_onlyprint { 190 | display: none; 191 | } 192 | 193 | /*____________ tabs ____________*/ 194 | /* in addition to template styles */ 195 | 196 | .plugin_wrap.tabs { 197 | margin-bottom: 1.4em; 198 | } 199 | 200 | /*____________ button-style link ____________*/ 201 | 202 | .wrap_button a:link, 203 | .wrap_button a:visited { 204 | background-color: @ini_background_alt; 205 | } 206 | .wrap_button a:link:hover, 207 | .wrap_button a:visited:hover, 208 | .wrap_button a:link:focus, 209 | .wrap_button a:visited:focus, 210 | .wrap_button a:link:active, 211 | .wrap_button a:visited:active { 212 | background-color: @ini_background_neu; 213 | } 214 | 215 | } /* /.dokuwiki */ 216 | -------------------------------------------------------------------------------- /syntax/closesection.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | class syntax_plugin_wrap_closesection extends DokuWiki_Syntax_Plugin { 10 | 11 | function getType(){ return 'substition';} 12 | function getPType(){ return 'block';} 13 | function getSort(){ return 195; } 14 | 15 | /** 16 | * Dummy handler, this syntax part has no syntax but is directly added to the instructions by the div syntax 17 | */ 18 | function handle($match, $state, $pos, Doku_Handler $handler){ 19 | } 20 | 21 | /** 22 | * Create output 23 | */ 24 | function render($format, Doku_Renderer $renderer, $data) { 25 | if($format == 'xhtml'){ 26 | /** @var Doku_Renderer_xhtml $renderer */ 27 | $renderer->finishSectionEdit(); 28 | return true; 29 | } 30 | return false; 31 | } 32 | 33 | 34 | } 35 | 36 | -------------------------------------------------------------------------------- /syntax/div.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | class syntax_plugin_wrap_div extends DokuWiki_Syntax_Plugin { 10 | protected $special_pattern = '\r\n]*?/>'; 11 | protected $entry_pattern = '(?=.*?
)'; 12 | protected $exit_pattern = '
'; 13 | 14 | function getType(){ return 'formatting';} 15 | function getAllowedTypes() { return array('container', 'formatting', 'substition', 'protected', 'disabled', 'paragraphs'); } 16 | function getPType(){ return 'stack';} 17 | function getSort(){ return 195; } 18 | // override default accepts() method to allow nesting - ie, to get the plugin accepts its own entry syntax 19 | function accepts($mode) { 20 | if ($mode == substr(get_class($this), 7)) return true; 21 | return parent::accepts($mode); 22 | } 23 | 24 | /** 25 | * Connect pattern to lexer 26 | */ 27 | function connectTo($mode) { 28 | $this->Lexer->addSpecialPattern($this->special_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent()); 29 | $this->Lexer->addEntryPattern($this->entry_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent()); 30 | } 31 | 32 | function postConnect() { 33 | $this->Lexer->addExitPattern($this->exit_pattern, 'plugin_wrap_'.$this->getPluginComponent()); 34 | $this->Lexer->addPattern('[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)', 'plugin_wrap_'.$this->getPluginComponent()); 35 | } 36 | 37 | /** 38 | * Handle the match 39 | */ 40 | function handle($match, $state, $pos, Doku_Handler $handler){ 41 | global $conf; 42 | switch ($state) { 43 | case DOKU_LEXER_ENTER: 44 | case DOKU_LEXER_SPECIAL: 45 | $data = strtolower(trim(substr($match,strpos($match,' '),-1)," \t\n/")); 46 | return array($state, $data); 47 | 48 | case DOKU_LEXER_UNMATCHED: 49 | $handler->addCall('cdata', array($match), $pos); 50 | break; 51 | 52 | case DOKU_LEXER_MATCHED: 53 | // we have a == header ==, use the core header() renderer 54 | // (copied from core header() in inc/parser/handler.php) 55 | $title = trim($match); 56 | $level = 7 - strspn($title,'='); 57 | if($level < 1) $level = 1; 58 | $title = trim($title,'='); 59 | $title = trim($title); 60 | 61 | $handler->addCall('header',array($title,$level,$pos), $pos); 62 | // close the section edit the header could open 63 | if ($title && $level <= $conf['maxseclevel']) { 64 | $handler->addPluginCall('wrap_closesection', array(), DOKU_LEXER_SPECIAL, $pos, ''); 65 | } 66 | break; 67 | 68 | case DOKU_LEXER_EXIT: 69 | return array($state, ''); 70 | } 71 | return false; 72 | } 73 | 74 | /** 75 | * Create output 76 | */ 77 | function render($format, Doku_Renderer $renderer, $indata) { 78 | static $type_stack = array (); 79 | 80 | if (empty($indata)) return false; 81 | list($state, $data) = $indata; 82 | 83 | if($format == 'xhtml'){ 84 | /** @var Doku_Renderer_xhtml $renderer */ 85 | switch ($state) { 86 | case DOKU_LEXER_ENTER: 87 | $sectionEditStartData = ['target' => 'plugin_wrap_start', 'hid' => '']; 88 | $sectionEditEndData = ['target' =>'plugin_wrap_end', 'hid' => '']; 89 | if (!defined('SEC_EDIT_PATTERN')) { 90 | // backwards-compatibility for Frusterick Manners (2017-02-19) 91 | $sectionEditStartData = 'plugin_wrap_start'; 92 | $sectionEditEndData = 'plugin_wrap_end'; 93 | } 94 | // add a section edit right at the beginning of the wrap output 95 | $renderer->startSectionEdit(0, $sectionEditStartData); 96 | $renderer->finishSectionEdit(); 97 | // add a section edit for the end of the wrap output. This prevents the renderer 98 | // from closing the last section edit so the next section button after the wrap syntax will 99 | // include the whole wrap syntax 100 | $renderer->startSectionEdit(0, $sectionEditEndData); 101 | 102 | case DOKU_LEXER_SPECIAL: 103 | $wrap = $this->loadHelper('wrap'); 104 | $attr = $wrap->buildAttributes($data, 'plugin_wrap'); 105 | 106 | $renderer->doc .= ''; 107 | if ($state == DOKU_LEXER_SPECIAL) $renderer->doc .= ''; 108 | break; 109 | 110 | case DOKU_LEXER_EXIT: 111 | $renderer->doc .= ''; 112 | $renderer->finishSectionEdit(); 113 | break; 114 | } 115 | return true; 116 | } 117 | if($format == 'odt'){ 118 | switch ($state) { 119 | case DOKU_LEXER_ENTER: 120 | $wrap = plugin_load('helper', 'wrap'); 121 | array_push ($type_stack, $wrap->renderODTElementOpen($renderer, 'div', $data)); 122 | break; 123 | 124 | case DOKU_LEXER_EXIT: 125 | $element = array_pop ($type_stack); 126 | $wrap = plugin_load('helper', 'wrap'); 127 | $wrap->renderODTElementClose ($renderer, $element); 128 | break; 129 | } 130 | return true; 131 | } 132 | return false; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /syntax/divblock.php: -------------------------------------------------------------------------------- 1 | ...
syntax 6 | * 7 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 | * @author Anika Henke 9 | */ 10 | 11 | class syntax_plugin_wrap_divblock extends syntax_plugin_wrap_div { 12 | 13 | protected $special_pattern = '\r\n]*?/>'; 14 | protected $entry_pattern = '(?=.*?)'; 15 | protected $exit_pattern = ''; 16 | 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /syntax/divwrap.php: -------------------------------------------------------------------------------- 1 | ...
syntax 6 | * 7 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 | * @author Anika Henke 9 | */ 10 | 11 | class syntax_plugin_wrap_divwrap extends syntax_plugin_wrap_div { 12 | 13 | protected $special_pattern = '\r\n]*?/>'; 14 | protected $entry_pattern = '(?=.*?
)'; 15 | protected $exit_pattern = ''; 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /syntax/span.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | class syntax_plugin_wrap_span extends DokuWiki_Syntax_Plugin { 10 | protected $special_pattern = '\r\n]*?/>'; 11 | protected $entry_pattern = '(?=.*?)'; 12 | protected $exit_pattern = ''; 13 | 14 | function getType(){ return 'formatting';} 15 | function getAllowedTypes() { return array('formatting', 'substition', 'disabled'); } 16 | function getPType(){ return 'normal';} 17 | function getSort(){ return 195; } 18 | // override default accepts() method to allow nesting - ie, to get the plugin accepts its own entry syntax 19 | function accepts($mode) { 20 | if ($mode == substr(get_class($this), 7)) return true; 21 | return parent::accepts($mode); 22 | } 23 | 24 | /** 25 | * Connect pattern to lexer 26 | */ 27 | function connectTo($mode) { 28 | $this->Lexer->addSpecialPattern($this->special_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent()); 29 | $this->Lexer->addEntryPattern($this->entry_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent()); 30 | } 31 | 32 | function postConnect() { 33 | $this->Lexer->addExitPattern($this->exit_pattern, 'plugin_wrap_'.$this->getPluginComponent()); 34 | } 35 | 36 | /** 37 | * Handle the match 38 | */ 39 | function handle($match, $state, $pos, Doku_Handler $handler){ 40 | switch ($state) { 41 | case DOKU_LEXER_ENTER: 42 | case DOKU_LEXER_SPECIAL: 43 | $data = strtolower(trim(substr($match,strpos($match,' '),-1)," \t\n/")); 44 | return array($state, $data); 45 | 46 | case DOKU_LEXER_UNMATCHED : 47 | $handler->addCall('cdata', array($match), $pos); 48 | return false; 49 | 50 | case DOKU_LEXER_EXIT : 51 | return array($state, ''); 52 | 53 | } 54 | return false; 55 | } 56 | 57 | /** 58 | * Create output 59 | */ 60 | function render($format, Doku_Renderer $renderer, $indata) { 61 | static $type_stack = array (); 62 | 63 | if (empty($indata)) return false; 64 | list($state, $data) = $indata; 65 | 66 | if($format == 'xhtml'){ 67 | switch ($state) { 68 | case DOKU_LEXER_ENTER: 69 | case DOKU_LEXER_SPECIAL: 70 | $wrap = $this->loadHelper('wrap'); 71 | $attr = $wrap->buildAttributes($data); 72 | 73 | $renderer->doc .= ''; 74 | if ($state == DOKU_LEXER_SPECIAL) $renderer->doc .= ''; 75 | break; 76 | 77 | case DOKU_LEXER_EXIT: 78 | $renderer->doc .= ''; 79 | break; 80 | } 81 | return true; 82 | } 83 | if($format == 'odt'){ 84 | switch ($state) { 85 | case DOKU_LEXER_ENTER: 86 | $wrap = plugin_load('helper', 'wrap'); 87 | array_push ($type_stack, $wrap->renderODTElementOpen($renderer, 'span', $data)); 88 | break; 89 | 90 | case DOKU_LEXER_EXIT: 91 | $element = array_pop ($type_stack); 92 | $wrap = plugin_load('helper', 'wrap'); 93 | $wrap->renderODTElementClose ($renderer, $element); 94 | break; 95 | } 96 | return true; 97 | } 98 | return false; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /syntax/spaninline.php: -------------------------------------------------------------------------------- 1 | ... syntax 6 | * 7 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 | * @author Anika Henke 9 | */ 10 | 11 | class syntax_plugin_wrap_spaninline extends syntax_plugin_wrap_span { 12 | 13 | protected $special_pattern = '\r\n]*?/>'; 14 | protected $entry_pattern = '(?=.*?)'; 15 | protected $exit_pattern = ''; 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /syntax/spanwrap.php: -------------------------------------------------------------------------------- 1 | ... syntax 6 | * 7 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 | * @author Anika Henke 9 | */ 10 | 11 | class syntax_plugin_wrap_spanwrap extends syntax_plugin_wrap_span { 12 | 13 | protected $special_pattern = '\r\n]*?/>'; 14 | protected $entry_pattern = '(?=.*?)'; 15 | protected $exit_pattern = ''; 16 | 17 | 18 | } 19 | 20 | --------------------------------------------------------------------------------