mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Made a bunch of tinymce 6 upgrade fixes
- Added workaround for new 'srcdoc' usage that's breaking content in Firefox, added new 'custom-changes.md' file to document for future. - Updated old usages of 'new' when creating nodes. - Tested and changed logic, where required, where 'editor.dom.select' has been used to replace the old '$' usages. - Fixed bad boolean value being passed to 'setActive' in task list logic.
This commit is contained in:
@ -64,13 +64,13 @@ function register(editor, url) {
|
||||
editor.insertContent(details.outerHTML);
|
||||
editor.focus();
|
||||
|
||||
const domDetails = editor.dom.select(`[data-id="${id}"]`);
|
||||
if (!domDetails.length) {
|
||||
const firstChild = domDetails.find('doc-root > *');
|
||||
const domDetails = editor.dom.select(`[data-id="${id}"]`)[0] || null;
|
||||
if (domDetails) {
|
||||
const firstChild = domDetails.querySelector('doc-root > *');
|
||||
if (firstChild) {
|
||||
firstChild[0].focus();
|
||||
firstChild.focus();
|
||||
}
|
||||
domDetails.removeAttr('data-id');
|
||||
domDetails.removeAttribute('data-id');
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user