Skip to content

Commit 75a0d40

Browse files
committed
add subfigure toolbar option
1 parent 9c1b896 commit 75a0d40

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

action.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ public function insert_button(&$event, $param) {
3333
'sample' => '{{:img |title}}',
3434
'close' => '\n<'.$captiontag.'>caption</'.$captiontag.'>\n</figure>',
3535
),
36+
array(
37+
'type' => 'format',
38+
'title' => $this->getLang('subfigure'),
39+
'icon' => '../../plugins/latexcaption/images/subfig.png',
40+
'open' => '<figure center|fig_label>\n<subfigure|subfig_a_label>\n',
41+
'sample' => '{{:img1 |title}}',
42+
'close' => '\n<'.$captiontag.'>subfigure a caption</'.$captiontag.'>\n</subfigure>\n<subfigure|subfig_b_label>\n{{:img2 | title}}\n<'.$captiontag.'>subfigure b caption</'.$captiontag.'>\n</subfigure>\n<'.$captiontag.'>Main caption</'.$captiontag.'>\n</figure>',
43+
),
3644
array(
3745
'type' => 'format',
3846
'title' => $this->getLang('table'),

images/subfig.png

509 Bytes
Loading

lang/en/lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
$lang['fileblocklong'] = 'Listing';
1717
$lang['fileblockabbrev'] = 'Listing.';
1818
$lang['figure'] = 'Add figure with caption';
19+
$lang['subfigure'] = 'Add figure with subfigure';
1920
$lang['table'] = 'Add table with caption';
2021
$lang['code'] = 'Add code listing with caption';
2122
$lang['file'] = 'Add file listing with caption';

0 commit comments

Comments
 (0)