bug fixes
This commit is contained in:
parent
4973910146
commit
74469b9087
@ -408,6 +408,7 @@ function buildLongTextInput(source, textarea, label) {
|
||||
textarea.style.display = "none";
|
||||
label.style.display = "none";
|
||||
|
||||
|
||||
let title = document.createElement("span");
|
||||
title.innerText = label.innerText;
|
||||
|
||||
@ -427,10 +428,14 @@ function buildLongTextInput(source, textarea, label) {
|
||||
"olist"
|
||||
],
|
||||
onChange: function (html) {
|
||||
//correct lastElement
|
||||
activeState.lastElement = textarea.id;
|
||||
textarea.value = html;
|
||||
},
|
||||
});
|
||||
|
||||
activeState.editor = editor;
|
||||
|
||||
let actionBar = editor.getElementsByClassName("pell-actionbar")[0];
|
||||
let content = editor.getElementsByClassName("pell-content")[0];
|
||||
|
||||
@ -438,6 +443,7 @@ function buildLongTextInput(source, textarea, label) {
|
||||
let newActionBarElements = [];
|
||||
for (let actionBarElement of actionBarElements ) {
|
||||
actionBarElement.classList.add("w3-right");
|
||||
actionBarElement.setAttribute("tabindex","-1");
|
||||
newActionBarElements.push(actionBarElement);
|
||||
}
|
||||
//reverse actionbar back to org order
|
||||
|
||||
@ -62,6 +62,14 @@ function insertTextBlocks(t) {
|
||||
element.value += insert;
|
||||
let tB = document.getElementById("navTb");
|
||||
tB.className.replace(" w3-show", "");
|
||||
|
||||
if (element.parentElement != undefined) {
|
||||
if (element.parentElement.getElementsByClassName("pell-content")[0] != undefined) {
|
||||
activeState.editor.content.innerHTML = element.value;
|
||||
element = element.parentElement.getElementsByClassName("pell-content")[0];
|
||||
}
|
||||
}
|
||||
|
||||
element.focus();
|
||||
}
|
||||
|
||||
|
||||
@ -283,6 +283,14 @@ function formEvts() {
|
||||
|
||||
function focusOnField(id) {
|
||||
let targetElement = document.getElementById(id);
|
||||
|
||||
//handle pell content focus
|
||||
if (targetElement.parentElement != undefined) {
|
||||
if (targetElement.parentElement.getElementsByClassName("pell-content")[0] != undefined) {
|
||||
targetElement = targetElement.parentElement.getElementsByClassName("pell-content")[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (targetElement == null) return;
|
||||
document.activeElement.blur();
|
||||
targetElement.focus();
|
||||
|
||||
@ -46,7 +46,8 @@ window.activeState = {
|
||||
"markup",
|
||||
],
|
||||
markups: ["title", "link", "italic", "green_highlighted", "highlighted"],
|
||||
storage: []
|
||||
storage: [],
|
||||
editor: null
|
||||
};
|
||||
|
||||
function init() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user