style: fix image caption style to avoid mess up after export

Use span instead of div to wrap the image caption.
This commit is contained in:
Le Tan 2018-11-01 21:22:23 +08:00
parent 61925a9c30
commit 6455e9ca19
5 changed files with 8 additions and 8 deletions

View File

@ -875,10 +875,10 @@ var insertImageCaption = function() {
}
// Add caption.
var captionDiv = document.createElement('div');
captionDiv.classList.add(VImageCaptionClass);
captionDiv.textContent = img.alt;
img.insertAdjacentElement('afterend', captionDiv);
var captionSpan = document.createElement('span');
captionSpan.classList.add(VImageCaptionClass);
captionSpan.textContent = img.alt;
img.insertAdjacentElement('afterend', captionSpan);
}
};

View File

@ -208,7 +208,7 @@ img.img-center {
margin-right: auto;
}
div.img-caption {
span.img-caption {
min-width: 20%;
max-width: 80%;
display: inline-block;

View File

@ -206,7 +206,7 @@ img.img-center {
margin-right: auto;
}
div.img-caption {
span.img-caption {
min-width: 20%;
max-width: 80%;
display: inline-block;

View File

@ -200,7 +200,7 @@ img.img-center {
margin-right: auto;
}
div.img-caption {
span.img-caption {
min-width: 20%;
max-width: 80%;
display: inline-block;

View File

@ -202,7 +202,7 @@ img.img-center {
margin-right: auto;
}
div.img-caption {
span.img-caption {
min-width: 20%;
max-width: 80%;
display: inline-block;