[WEB-2730] chore: core/editor updates to support mobile editor (#5910)

* added editor changes w.r.t mobile-editor

* added external extensions option

* fix: type errors in image block

* added on transaction method

* fix: optional prop fixed

* fix: memoize the extensions array

* fix: added missing deps

* fix: image component types

* fix: remove range prop

* fix: type fixes and better names of img src

* fix: image load blinking

* fix: code review

* fix: props code review

* fix: coderabbit review

---------

Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com>
This commit is contained in:
Lakhan Baheti 2024-10-30 17:39:02 +05:30 committed by GitHub
parent 8ea34b5995
commit 3696062372
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 164 additions and 61 deletions

View file

@ -14,7 +14,8 @@ type Props = {
};
export const DocumentEditorAdditionalExtensions = (_props: Props) => {
const extensions: Extensions = [SlashCommands()];
const { disabledExtensions } = _props;
const extensions: Extensions = disabledExtensions?.includes("slash-commands") ? [] : [SlashCommands()];
return extensions;
};