Add binary files support (#503)
This commit is contained in:
@@ -196,8 +196,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
let arr = Array.from(allEditorsdom);
|
||||
arr.forEach((el: HTMLElement) => {
|
||||
// in case we edit the gist contents
|
||||
let currEditor = newEditor(el, el.querySelector<HTMLInputElement>(".form-filecontent")!.value);
|
||||
editorsjs.push(currEditor);
|
||||
let formFileContent =el.querySelector<HTMLInputElement>(".form-filecontent")
|
||||
if (formFileContent !== null) {
|
||||
let currEditor = newEditor(el, el.querySelector<HTMLInputElement>(".form-filecontent")!.value);
|
||||
editorsjs.push(currEditor);
|
||||
}
|
||||
});
|
||||
|
||||
checkForFirstDeleteButton();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import PDFObject from 'pdfobject';
|
||||
|
||||
document.querySelectorAll<HTMLElement>('.table-code').forEach((el) => {
|
||||
el.addEventListener('click', event => {
|
||||
if (event.target && (event.target as HTMLElement).matches('.line-num')) {
|
||||
@@ -75,5 +77,7 @@ if (document.getElementById('gist').dataset.own) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
document.querySelectorAll(".pdf").forEach((el) => {
|
||||
PDFObject.embed(el.dataset.src || "", el);
|
||||
})
|
||||
|
||||
|
||||
4
public/style.css
vendored
4
public/style.css
vendored
@@ -188,4 +188,8 @@ dl.dl-config dd {
|
||||
|
||||
.hidden-important {
|
||||
@apply hidden !important;
|
||||
}
|
||||
|
||||
.pdfobject-container {
|
||||
@apply min-h-[700px] h-[700px] !important;
|
||||
}
|
||||
Reference in New Issue
Block a user