mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-05 08:39:55 +03:00
Lexical: Revamped image node resize method
Changed from using a decorator to using a helper that watches for image selections to then display a resize helper. Also changes resizer to use a ghost and apply changes on end instead of continuosly during resize.
This commit is contained in:
@@ -13,6 +13,7 @@ import {registerTaskListHandler} from "./ui/framework/helpers/task-list-handler"
|
||||
import {registerTableSelectionHandler} from "./ui/framework/helpers/table-selection-handler";
|
||||
import {el} from "./utils/dom";
|
||||
import {registerShortcuts} from "./services/shortcuts";
|
||||
import {registerImageResizer} from "./ui/framework/helpers/image-resizer";
|
||||
|
||||
export function createPageEditorInstance(container: HTMLElement, htmlContent: string, options: Record<string, any> = {}): SimpleWysiwygEditorInterface {
|
||||
const config: CreateEditorArgs = {
|
||||
@@ -55,6 +56,7 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
|
||||
registerTableSelectionHandler(editor),
|
||||
registerTaskListHandler(editor, editArea),
|
||||
registerDropPasteHandling(context),
|
||||
registerImageResizer(context),
|
||||
);
|
||||
|
||||
listenToCommonEvents(editor);
|
||||
|
||||
Reference in New Issue
Block a user