Files
partition-jlg-theme/resources/scripts/custom-editor-script.js
T
2023-11-02 08:04:25 +01:00

22 lines
803 B
JavaScript

(function($) {
// Access the page content
var pageContent = pageContentData.content;
// Now you can use the 'pageContent' variable in your JavaScript code
console.log(pageContent);
setTimeout(() => {
let editorWriting = document.querySelector('.edit-post-visual-editor');
let writingSpace = document.querySelector('.block-editor-writing-flow');
writingSpace.style.padding = "0";
console.log(editorWriting);
let tutorialWrapper = document.createElement('div');
tutorialWrapper.style.width = "100%";
tutorialWrapper.style.backgroundColor = "#384756";
tutorialWrapper.style.padding = "20px";
tutorialWrapper.innerHTML = pageContent;
editorWriting.appendChild(tutorialWrapper);
}, 2000);
})(jQuery);