@flozy/editor 1.5.8 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +103 -17
- package/dist/Editor/Editor.css +194 -24
- package/dist/Editor/Elements/Accordion/Accordion.js +0 -1
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +0 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +134 -131
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -2
- package/dist/Editor/Elements/Button/EditorButton.js +4 -4
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +29 -58
- package/dist/Editor/Elements/Embed/Embed.js +18 -16
- package/dist/Editor/Elements/Embed/Image.js +11 -2
- package/dist/Editor/Elements/Embed/Video.js +10 -2
- package/dist/Editor/Elements/Form/Form.js +0 -1
- package/dist/Editor/Elements/Form/FormButton.js +2 -2
- package/dist/Editor/Elements/Form/FormElements/FormText.js +3 -2
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +3 -2
- package/dist/Editor/Elements/Grid/Grid.js +128 -43
- package/dist/Editor/Elements/Grid/GridItem.js +2 -2
- package/dist/Editor/Elements/InlineIcon/InlineIcon.js +0 -1
- package/dist/Editor/Elements/PageSettings/PageSettings.js +4 -2
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +0 -2
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -1
- package/dist/Editor/Toolbar/FormatTools/Autocomplete.js +0 -2
- package/dist/Editor/Toolbar/FormatTools/FontFamilyDropdown.js +63 -0
- package/dist/Editor/Toolbar/FormatTools/FontSize.js +112 -0
- package/dist/Editor/Toolbar/FormatTools/index.js +3 -1
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +3 -3
- package/dist/Editor/Toolbar/PopupTool/index.js +25 -49
- package/dist/Editor/Toolbar/Toolbar.js +21 -5
- package/dist/Editor/Toolbar/styles.css +135 -17
- package/dist/Editor/Toolbar/toolbarGroups.js +21 -10
- package/dist/Editor/common/Icon.js +7 -1
- package/dist/Editor/common/ImageList.js +69 -0
- package/dist/Editor/common/ImageUploader.js +83 -0
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +3 -3
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +3 -3
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +5 -5
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/chipTextStyle.js +3 -3
- package/dist/Editor/common/StyleBuilder/embedImageStyle.js +18 -5
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +8 -0
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +3 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +2 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +41 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +95 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +14 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +0 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +3 -2
- package/dist/Editor/common/StyleBuilder/formButtonStyle.js +3 -3
- package/dist/Editor/common/StyleBuilder/formStyle.js +3 -3
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +1 -1
- package/dist/Editor/common/Uploader.js +25 -54
- package/dist/Editor/common/iconslist.js +26 -1
- package/dist/Editor/helper/index.js +0 -1
- package/dist/Editor/hooks/useDrag.js +2 -2
- package/dist/Editor/utils/SlateUtilityFunctions.js +1 -0
- package/dist/Editor/utils/button.js +2 -1
- package/dist/Editor/utils/embed.js +6 -3
- package/package.json +3 -2
@@ -2,20 +2,23 @@ import { Transforms } from "slate";
|
|
2
2
|
import { createParagraph } from "./paragraph";
|
3
3
|
export const createEmbedNode = (type, {
|
4
4
|
url,
|
5
|
-
alt
|
5
|
+
alt,
|
6
|
+
images
|
6
7
|
}) => ({
|
7
8
|
type,
|
8
9
|
alt,
|
9
10
|
url,
|
11
|
+
images: images || [],
|
10
12
|
children: [{
|
11
13
|
text: ""
|
12
14
|
}]
|
13
15
|
});
|
14
16
|
export const insertEmbed = (editor, embedData, format) => {
|
15
17
|
const {
|
16
|
-
url
|
18
|
+
url,
|
19
|
+
images
|
17
20
|
} = embedData;
|
18
|
-
if (!url) return;
|
21
|
+
if (!url && images.length === 0) return;
|
19
22
|
const embed = createEmbedNode(format, embedData);
|
20
23
|
Transforms.insertNodes(editor, embed, {
|
21
24
|
select: true
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flozy/editor",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.6.0",
|
4
4
|
"description": "An Editor for flozy app brain",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -55,7 +55,8 @@
|
|
55
55
|
"eject": "react-scripts eject",
|
56
56
|
"storybook": "storybook dev -p 6006",
|
57
57
|
"build-storybook": "storybook build",
|
58
|
-
"publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files"
|
58
|
+
"publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files",
|
59
|
+
"publish:local": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files && rm -rf /Users/dineshkumar/Desktop/devop/sweetpsocial-2.0/client/node_modules/@flozy/editor/dist && babel dist -d /Users/dineshkumar/Desktop/devop/sweetpsocial-2.0/client/node_modules/@flozy/editor/dist --copy-files"
|
59
60
|
},
|
60
61
|
"eslintConfig": {
|
61
62
|
"extends": [
|