You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
1 After the element is added into the editor the cursor jumps to the beginning of the editor container
2. After adding a table the cursor is not focused (expected to be at the end of the table and if enter key pressed to go to the line)
Below is how i am creating the plugin and how inserting elements in the editor itself.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Issue:
1 After the element is added into the editor the cursor jumps to the beginning of the editor container
2. After adding a table the cursor is not focused (expected to be at the end of the table and if enter key pressed to go to the line)
Below is how i am creating the plugin and how inserting elements in the editor itself.
`const InputTag = {
name: "InputTag",
display: "submenu",
add(core: CoreType, targetElement: HTMLElement) {
const listDiv = this.setSubmenu(core);
const self = this;
listDiv.querySelectorAll(".se-btn-list").forEach((btn: any) => {
btn.addEventListener("click", self.onClick.bind(core, core));
});
core.initMenuTarget(this.name, targetElement, listDiv);
},
setSubmenu(core: CoreType): HTMLElement {
const listDiv = core.util.createElement("DIV");
listDiv.className = "se-submenu se-list-layer";
listDiv.innerHTML =
'
'
' +- " +
" +- " +
" +- " +
"
'Input' +
"
"
'Textarea' +
"
"
'Group
"";
return listDiv;
},
onClick(core: CoreType, e: any) {
const targetValue = e.target.value;
},
};
export default InputTag;`
const generateRadioCheckbox = (formValues: any, elementID: string) => { const emptyBox = document.querySelector(
.${elementID}) as HTMLElement; if (!emptyBox) return; emptyBox.textContent = ""; emptyBox.className =
${emptyBox.className
} radio-group radioCollection select-group GROUP_TYPE ${
formValues.isRequired ? "required" : ""
}
; emptyBox.style.display = "inline-flex"; emptyBox.style.verticalAlign = "bottom"; if (formValues.isDisplayedOnRow) { emptyBox.className =
${emptyBox.className} row`;} else {
emptyBox.classList.remove("row");
}
};
`
Can anyone point me into the right direction to solve this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions