File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
notes-webapp/src/main/webapp/vue-app Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -960,23 +960,20 @@ export default {
960
960
const oEmbeds = docElement .querySelectorAll (' oembed' );
961
961
oEmbeds .forEach ((oembed , index ) => {
962
962
oembed .innerHTML = decodeURIComponent (oembed .innerHTML );
963
- oembed .dataset .htmlSource = iframes[index]? .parentNode ? .innerHTML ? .toString ();
963
+ oembed .dataset .iframe = iframes[index]? .parentNode ? .innerHTML ? .toString ();
964
964
const width = iframes[index]? .parentNode ? .offsetWidth ;
965
965
const height = iframes[index]? .parentNode ? .offsetHeight ;
966
966
const aspectRatio = width / height;
967
967
const minHeight = parseInt (this .oembedMinWidth ) / aspectRatio;
968
968
const style = `
969
- position: relative;
970
- display: flex;
971
- margin: auto;
972
969
min-height: ${ minHeight} px;
973
970
min-width: ${ this .oembedMinWidth } px;
974
- width: ${ width} px;
975
- height:${ height} px;
971
+ width: 100%;
976
972
margin-bottom: 10px;
977
973
aspect-ratio: ${ aspectRatio} ;
978
974
` ;
979
975
oembed .setAttribute (' style' , style);
976
+ oembed .setAttribute (' class' , ' d-flex position-relative ml-auto mr-auto' );
980
977
});
981
978
return docElement? .children [1 ].innerHTML ;
982
979
},
Original file line number Diff line number Diff line change @@ -860,12 +860,11 @@ export default {
860
860
const contentChildren = docElement.getElementsByTagName('body')[0].children;
861
861
const links = docElement.getElementsByTagName('a');
862
862
const tables = docElement.getElementsByTagName('table');
863
- const oEmbeds = docElement.getElementsByTagName('oembed');
864
863
docElement.querySelectorAll('pre > code').forEach((e) => codeHighlighter.highlightBlock(e));
865
- for (const oembed of oEmbeds) {
866
- oembed.innerHTML = oembed.dataset.htmlSource ;
867
- delete oembed.dataset.htmlSource ;
868
- }
864
+ docElement.querySelectorAll(' oembed').forEach((oembed) => {
865
+ oembed.innerHTML = oembed.dataset.iframe ;
866
+ delete oembed.dataset.iframe ;
867
+ });
869
868
for (const link of links) {
870
869
let href = link.href.replace(/(^\w +:|^)\/\/ /, '');
871
870
if (href.endsWith('/')) {
@@ -885,7 +884,6 @@ export default {
885
884
table.removeAttribute('summary');
886
885
}
887
886
}
888
- table.style.border = ` ${table .getAttribute (' border' )}px solid` ;
889
887
}
890
888
if (contentChildren) {
891
889
for (let i = 0; i < contentChildren.length; i++) { // NOSONAR not iterable
You can’t perform that action at this time.
0 commit comments