mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Lexical: Fixed strange paragraph formatting behaviour
Formatting was not persisted on empty paragraphs, and was instead based upon last format encountered in selection. This was due to overly-hasty removal of other formatting code, which this got caught it. Restored required parts from prior codebase. Also updated inline format button active indicator to reflect formats using the above, so correct buttons are shown as active even when just in an empty paragraph.
This commit is contained in:
@ -84,7 +84,7 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
|
||||
|
||||
// @ts-ignore
|
||||
window.debugEditorState = () => {
|
||||
console.log(editor.getEditorState().toJSON());
|
||||
return editor.getEditorState().toJSON();
|
||||
};
|
||||
|
||||
registerCommonNodeMutationListeners(context);
|
||||
|
Reference in New Issue
Block a user