mirror of
https://github.com/cosmocode/dokuwiki-plugin-prosemirror.git
synced 2025-08-16 15:25:58 +00:00
fix: correctly align images with title to the left
The right space for left or center alignment has to be between the image id and the caption pipe.
This commit is contained in:
22
_test/json/internalimage_with_title_and_left_alignment.json
Normal file
22
_test/json/internalimage_with_title_and_left_alignment.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "doc",
|
||||
"content": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"content": [
|
||||
{
|
||||
"type": "image",
|
||||
"attrs": {
|
||||
"src": "\/.\/lib\/exe\/fetch.php?media=wiki:dokuwiki-128.png",
|
||||
"title": "foo and bar",
|
||||
"class": "medialeft",
|
||||
"align": "left",
|
||||
"id": "wiki:dokuwiki-128.png",
|
||||
"cache": "cache",
|
||||
"linking": "details"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{wiki:dokuwiki-128.png |foo and bar}}
|
@ -54,7 +54,7 @@ class ImageNode extends Node
|
||||
}
|
||||
|
||||
|
||||
return '{{' . $leftAlign . $this->attrs['id'] . $queryString . $title . $rightAlign . '}}';
|
||||
return '{{' . $leftAlign . $this->attrs['id'] . $queryString . $rightAlign . $title . '}}';
|
||||
}
|
||||
|
||||
public static function render(\renderer_plugin_prosemirror $renderer, $src, $title = null, $align = null,
|
||||
|
Reference in New Issue
Block a user