@plone/volto 16.0.0-alpha.14 → 16.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +7 -2
- package/.github/workflows/acceptance.yml +67 -2
- package/CHANGELOG.md +10 -0
- package/addon-registry.js +33 -4
- package/cypress/support/commands.js +240 -2
- package/cypress/support/index.js +2 -0
- package/cypress/support/volto-slate.js +78 -0
- package/locales/ca/LC_MESSAGES/volto.po +2 -1
- package/locales/de/LC_MESSAGES/volto.po +2 -1
- package/locales/en/LC_MESSAGES/volto.po +2 -1
- package/locales/es/LC_MESSAGES/volto.po +2 -1
- package/locales/eu/LC_MESSAGES/volto.po +2 -1
- package/locales/fr/LC_MESSAGES/volto.po +2 -1
- package/locales/it/LC_MESSAGES/volto.po +2 -1
- package/locales/ja/LC_MESSAGES/volto.po +2 -1
- package/locales/nl/LC_MESSAGES/volto.po +2 -1
- package/locales/pt/LC_MESSAGES/volto.po +2 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +2 -1
- package/locales/ro/LC_MESSAGES/volto.po +2 -1
- package/locales/volto.pot +2 -1
- package/package.json +9 -1
- package/packages/README.md +7 -0
- package/packages/volto-slate/.i18n.babel.config.js +1 -0
- package/packages/volto-slate/README.md +235 -0
- package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +90 -0
- package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +6 -0
- package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +6 -0
- package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +6 -0
- package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +10 -0
- package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +10 -0
- package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +30 -0
- package/packages/volto-slate/build/messages/src/elementEditor/messages.json +10 -0
- package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +6 -0
- package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +6 -0
- package/packages/volto-slate/locales/de/LC_MESSAGES/volto.po +148 -0
- package/packages/volto-slate/locales/en/LC_MESSAGES/volto.po +148 -0
- package/packages/volto-slate/locales/volto.pot +182 -0
- package/packages/volto-slate/package.json +43 -0
- package/packages/volto-slate/src/actions/content.js +30 -0
- package/packages/volto-slate/src/actions/index.js +3 -0
- package/packages/volto-slate/src/actions/plugins.js +9 -0
- package/packages/volto-slate/src/actions/selection.js +22 -0
- package/packages/volto-slate/src/blocks/Table/Cell.jsx +87 -0
- package/packages/volto-slate/src/blocks/Table/Cell.test.js +54 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockEdit.jsx +885 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js +40 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +150 -0
- package/packages/volto-slate/src/blocks/Table/TableBlockView.test.js +49 -0
- package/packages/volto-slate/src/blocks/Table/deconstruct.js +113 -0
- package/packages/volto-slate/src/blocks/Table/extensions/normalizeTable.js +5 -0
- package/packages/volto-slate/src/blocks/Table/index.js +58 -0
- package/packages/volto-slate/src/blocks/Text/DefaultTextBlockEditor.jsx +300 -0
- package/packages/volto-slate/src/blocks/Text/DetachedTextBlockEditor.jsx +75 -0
- package/packages/volto-slate/src/blocks/Text/MarkdownIntroduction.jsx +59 -0
- package/packages/volto-slate/src/blocks/Text/PluginSidebar.jsx +18 -0
- package/packages/volto-slate/src/blocks/Text/ShortcutListing.jsx +28 -0
- package/packages/volto-slate/src/blocks/Text/SlashMenu.jsx +164 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockEdit.jsx +38 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js +107 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockSchema.js +54 -0
- package/packages/volto-slate/src/blocks/Text/TextBlockView.jsx +26 -0
- package/packages/volto-slate/src/blocks/Text/css/editor.css +18 -0
- package/packages/volto-slate/src/blocks/Text/extensions/Readme.md +49 -0
- package/packages/volto-slate/src/blocks/Text/extensions/breakList.js +100 -0
- package/packages/volto-slate/src/blocks/Text/extensions/index.js +5 -0
- package/packages/volto-slate/src/blocks/Text/extensions/insertBreak.js +57 -0
- package/packages/volto-slate/src/blocks/Text/extensions/isSelected.js +8 -0
- package/packages/volto-slate/src/blocks/Text/extensions/withDeserializers.js +85 -0
- package/packages/volto-slate/src/blocks/Text/extensions/withLists.js +5 -0
- package/packages/volto-slate/src/blocks/Text/index.js +166 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/backspaceInList.js +58 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/breakBlocks.js +3 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/cancelEsc.js +7 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/indentListItems.js +240 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/index.js +52 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/joinBlocks.js +177 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/moveListItems.js +124 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/slashMenu.js +16 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/softBreak.js +7 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/traverseBlocks.js +81 -0
- package/packages/volto-slate/src/blocks/Text/keyboard/unwrapEmptyString.js +26 -0
- package/packages/volto-slate/src/blocks/Text/schema.js +39 -0
- package/packages/volto-slate/src/constants.js +123 -0
- package/packages/volto-slate/src/editor/EditorContext.jsx +5 -0
- package/packages/volto-slate/src/editor/EditorReference.jsx +22 -0
- package/packages/volto-slate/src/editor/SlateEditor.jsx +369 -0
- package/packages/volto-slate/src/editor/config.jsx +313 -0
- package/packages/volto-slate/src/editor/decorate.js +63 -0
- package/packages/volto-slate/src/editor/deserialize.js +203 -0
- package/packages/volto-slate/src/editor/extensions/index.js +5 -0
- package/packages/volto-slate/src/editor/extensions/insertBreak.js +15 -0
- package/packages/volto-slate/src/editor/extensions/insertData.js +135 -0
- package/packages/volto-slate/src/editor/extensions/isInline.js +14 -0
- package/packages/volto-slate/src/editor/extensions/normalizeNode.js +45 -0
- package/packages/volto-slate/src/editor/extensions/withDeserializers.js +15 -0
- package/packages/volto-slate/src/editor/extensions/withTestingFeatures.jsx +84 -0
- package/packages/volto-slate/src/editor/index.js +14 -0
- package/packages/volto-slate/src/editor/less/editor.less +173 -0
- package/packages/volto-slate/src/editor/less/globals.less +18 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/deserialize.js +90 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/extensions.js +32 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/index.js +50 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/render.jsx +37 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/schema.js +114 -0
- package/packages/volto-slate/src/editor/plugins/AdvancedLink/styles.less +8 -0
- package/packages/volto-slate/src/editor/plugins/Blockquote/index.js +30 -0
- package/packages/volto-slate/src/editor/plugins/Callout/index.js +34 -0
- package/packages/volto-slate/src/editor/plugins/Image/deconstruct.js +30 -0
- package/packages/volto-slate/src/editor/plugins/Image/extensions.js +51 -0
- package/packages/volto-slate/src/editor/plugins/Image/index.js +11 -0
- package/packages/volto-slate/src/editor/plugins/Image/render.jsx +22 -0
- package/packages/volto-slate/src/editor/plugins/Link/extensions.js +53 -0
- package/packages/volto-slate/src/editor/plugins/Link/index.js +168 -0
- package/packages/volto-slate/src/editor/plugins/Link/render.jsx +46 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/constants.js +96 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/extensions.js +334 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/index.js +28 -0
- package/packages/volto-slate/src/editor/plugins/Markdown/utils.js +198 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableButton.jsx +142 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableCell.jsx +44 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableContainer.jsx +37 -0
- package/packages/volto-slate/src/editor/plugins/Table/TableSizePicker.jsx +83 -0
- package/packages/volto-slate/src/editor/plugins/Table/extensions.js +87 -0
- package/packages/volto-slate/src/editor/plugins/Table/index.js +390 -0
- package/packages/volto-slate/src/editor/plugins/Table/less/public.less +29 -0
- package/packages/volto-slate/src/editor/plugins/Table/less/table.less +28 -0
- package/packages/volto-slate/src/editor/plugins/Table/render.jsx +30 -0
- package/packages/volto-slate/src/editor/plugins/index.js +17 -0
- package/packages/volto-slate/src/editor/render.jsx +155 -0
- package/packages/volto-slate/src/editor/ui/BasicToolbar.jsx +11 -0
- package/packages/volto-slate/src/editor/ui/BlockButton.jsx +31 -0
- package/packages/volto-slate/src/editor/ui/ExpandedToolbar.jsx +18 -0
- package/packages/volto-slate/src/editor/ui/Expando.jsx +5 -0
- package/packages/volto-slate/src/editor/ui/InlineToolbar.jsx +71 -0
- package/packages/volto-slate/src/editor/ui/MarkButton.jsx +23 -0
- package/packages/volto-slate/src/editor/ui/MarkElementButton.jsx +30 -0
- package/packages/volto-slate/src/editor/ui/Menu.jsx +13 -0
- package/packages/volto-slate/src/editor/ui/PositionedToolbar.jsx +30 -0
- package/packages/volto-slate/src/editor/ui/Separator.jsx +7 -0
- package/packages/volto-slate/src/editor/ui/SlateContextToolbar.jsx +13 -0
- package/packages/volto-slate/src/editor/ui/SlateToolbar.jsx +94 -0
- package/packages/volto-slate/src/editor/ui/Toolbar.jsx +97 -0
- package/packages/volto-slate/src/editor/ui/ToolbarButton.jsx +33 -0
- package/packages/volto-slate/src/editor/ui/ToolbarButton.test.js +25 -0
- package/packages/volto-slate/src/editor/ui/index.js +14 -0
- package/packages/volto-slate/src/elementEditor/ContextButtons.jsx +56 -0
- package/packages/volto-slate/src/elementEditor/PluginEditor.jsx +123 -0
- package/packages/volto-slate/src/elementEditor/Readme.md +6 -0
- package/packages/volto-slate/src/elementEditor/SchemaProvider.jsx +3 -0
- package/packages/volto-slate/src/elementEditor/SidebarEditor.jsx +46 -0
- package/packages/volto-slate/src/elementEditor/ToolbarButton.jsx +44 -0
- package/packages/volto-slate/src/elementEditor/index.js +5 -0
- package/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js +100 -0
- package/packages/volto-slate/src/elementEditor/messages.js +14 -0
- package/packages/volto-slate/src/elementEditor/utils.js +215 -0
- package/packages/volto-slate/src/hooks/index.js +2 -0
- package/packages/volto-slate/src/hooks/useEditorContext.js +6 -0
- package/packages/volto-slate/src/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/packages/volto-slate/src/i18n.js +180 -0
- package/packages/volto-slate/src/icons/hashlink.svg +57 -0
- package/packages/volto-slate/src/index.js +59 -0
- package/packages/volto-slate/src/reducers/content.js +74 -0
- package/packages/volto-slate/src/reducers/index.js +3 -0
- package/packages/volto-slate/src/reducers/plugins.js +17 -0
- package/packages/volto-slate/src/reducers/selection.js +16 -0
- package/packages/volto-slate/src/utils/blocks.js +308 -0
- package/packages/volto-slate/src/utils/blocks.test.js +138 -0
- package/packages/volto-slate/src/utils/editor.js +31 -0
- package/packages/volto-slate/src/utils/image.js +25 -0
- package/packages/volto-slate/src/utils/index.js +11 -0
- package/packages/volto-slate/src/utils/internals.js +46 -0
- package/packages/volto-slate/src/utils/lists.js +92 -0
- package/packages/volto-slate/src/utils/marks.js +104 -0
- package/packages/volto-slate/src/utils/mime-types.js +24 -0
- package/packages/volto-slate/src/utils/nodes.js +4 -0
- package/packages/volto-slate/src/utils/ops.js +20 -0
- package/packages/volto-slate/src/utils/random.js +17 -0
- package/packages/volto-slate/src/utils/selection.js +233 -0
- package/packages/volto-slate/src/utils/slate-string-utils.js +408 -0
- package/packages/volto-slate/src/utils/volto-blocks.js +314 -0
- package/packages/volto-slate/src/widgets/ErrorBoundary.jsx +27 -0
- package/packages/volto-slate/src/widgets/HtmlSlateWidget.jsx +139 -0
- package/packages/volto-slate/src/widgets/ObjectByTypeWidget.jsx +49 -0
- package/packages/volto-slate/src/widgets/RichTextWidget.jsx +65 -0
- package/packages/volto-slate/src/widgets/RichTextWidgetView.jsx +37 -0
- package/packages/volto-slate/src/widgets/style.css +21 -0
- package/razzle.config.js +2 -0
- package/src/components/manage/Blocks/Block/Settings.jsx +2 -2
- package/src/components/manage/Blocks/Description/Edit.jsx +182 -211
- package/src/components/manage/Blocks/Description/Edit.test.jsx +42 -32
- package/src/components/manage/Blocks/Description/View.jsx +13 -8
- package/src/components/manage/Blocks/Table/Readme.md +5 -0
- package/src/components/manage/Blocks/Text/Readme.md +5 -0
- package/src/components/manage/Blocks/Title/Edit.jsx +166 -197
- package/src/components/manage/Blocks/Title/Edit.test.jsx +42 -32
- package/src/components/manage/Blocks/Title/View.jsx +13 -8
- package/src/components/manage/Blocks/ToC/Edit.jsx +29 -24
- package/src/components/manage/Blocks/ToC/Schema.jsx +43 -11
- package/src/components/manage/Blocks/ToC/View.jsx +87 -39
- package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +75 -0
- package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +65 -0
- package/src/components/manage/Blocks/ToC/variations/index.js +16 -0
- package/src/config/Blocks.jsx +4 -1
- package/src/config/index.js +4 -2
- package/src/components/manage/Blocks/ToC/Edit.test.jsx +0 -59
- package/src/components/manage/Blocks/ToC/View.test.jsx +0 -59
|
@@ -2606,7 +2606,8 @@ msgstr "Schimbă cu"
|
|
|
2606
2606
|
msgid "Table"
|
|
2607
2607
|
msgstr "Tabel"
|
|
2608
2608
|
|
|
2609
|
-
#: components/manage/Blocks/ToC/
|
|
2609
|
+
#: components/manage/Blocks/ToC/variations/DefaultTocRenderer
|
|
2610
|
+
#: components/manage/Blocks/ToC/variations/HorizontalMenu
|
|
2610
2611
|
# defaultMessage: Table of Contents
|
|
2611
2612
|
msgid "Table of Contents"
|
|
2612
2613
|
msgstr "Cuprins"
|
package/locales/volto.pot
CHANGED
|
@@ -2608,7 +2608,8 @@ msgstr ""
|
|
|
2608
2608
|
msgid "Table"
|
|
2609
2609
|
msgstr ""
|
|
2610
2610
|
|
|
2611
|
-
#: components/manage/Blocks/ToC/
|
|
2611
|
+
#: components/manage/Blocks/ToC/variations/DefaultTocRenderer
|
|
2612
|
+
#: components/manage/Blocks/ToC/variations/HorizontalMenu
|
|
2612
2613
|
# defaultMessage: Table of Contents
|
|
2613
2614
|
msgid "Table of Contents"
|
|
2614
2615
|
msgstr ""
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "16.0.0-alpha.
|
|
12
|
+
"version": "16.0.0-alpha.15",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"moduleNameMapper": {
|
|
83
83
|
"@plone/volto/(.*)$": "<rootDir>/src/$1",
|
|
84
|
+
"@plone/volto-slate": "<rootDir>/packages/volto-slate/src",
|
|
84
85
|
"~/config": "<rootDir>/src/config",
|
|
85
86
|
"~/../locales/${lang}.json": "<rootDir>/locales/en.json",
|
|
86
87
|
"(.*)/locales/(.*)": "<rootDir>/locales/$2",
|
|
@@ -289,6 +290,8 @@
|
|
|
289
290
|
"http-proxy-middleware": "2.0.1",
|
|
290
291
|
"husky": "4.2.5",
|
|
291
292
|
"identity-obj-proxy": "3.0.0",
|
|
293
|
+
"image-extensions": "1.1.0",
|
|
294
|
+
"is-url": "1.2.4",
|
|
292
295
|
"jest-css-modules": "1.1.0",
|
|
293
296
|
"jest-environment-jsdom-sixteen": "1.0.3",
|
|
294
297
|
"jest-file": "1.0.0",
|
|
@@ -335,6 +338,7 @@
|
|
|
335
338
|
"react-dropzone": "11.1.0",
|
|
336
339
|
"react-fast-compare": "2.0.4",
|
|
337
340
|
"react-image-gallery": "1.2.7",
|
|
341
|
+
"react-intersection-observer": "9.1.0",
|
|
338
342
|
"react-intl": "3.8.0",
|
|
339
343
|
"react-intl-redux": "2.2.0",
|
|
340
344
|
"react-medium-image-zoom": "3.0.15",
|
|
@@ -366,6 +370,10 @@
|
|
|
366
370
|
"semantic-ui-react": "2.0.3",
|
|
367
371
|
"semver": "5.6.0",
|
|
368
372
|
"serialize-javascript": "3.1.0",
|
|
373
|
+
"slate": "0.78.0",
|
|
374
|
+
"slate-history": "0.66.0",
|
|
375
|
+
"slate-hyperscript": "0.77.0",
|
|
376
|
+
"slate-react": "0.78.1",
|
|
369
377
|
"start-server-and-test": "1.14.0",
|
|
370
378
|
"stylelint": "14.0.1",
|
|
371
379
|
"stylelint-config-idiomatic-order": "8.1.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../babel');
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# volto-slate
|
|
2
|
+
|
|
3
|
+
TODO: fill in
|
|
4
|
+
|
|
5
|
+
An alternative text editor for Volto, capable of completely replacing the
|
|
6
|
+
default richtext editor while offering enhanced functionality and behavior. We
|
|
7
|
+
believe that, in order to succeed, Volto's richtext form editor (the Volto
|
|
8
|
+
Composite Page editor) needs strong integration between the rich text
|
|
9
|
+
capabilities and the rest of the Volto blocks. Some examples of the kind of
|
|
10
|
+
strong integration we have in mind:
|
|
11
|
+
|
|
12
|
+
- Pasting complex documents inside a volto-slate text block will create
|
|
13
|
+
multiple Volto blocks: images will be converted to Volto Image blocks, tables
|
|
14
|
+
will be converted to Volto Table blocks, etc.
|
|
15
|
+
- The text block accepts drag&drop images and it will upload them as Volto Image blocks.
|
|
16
|
+
- volto-slate has a Table button with the familiar size input, but it create a Table block
|
|
17
|
+
|
|
18
|
+
While this addon is still in an early alpha stage, we've solved most of the big
|
|
19
|
+
issues, the API starts to stabilize and we've already started several addons
|
|
20
|
+
based on it: https://github.com/eea/volto-slate-metadata-mentions/ and
|
|
21
|
+
https://github.com/eea/volto-slate-zotero
|
|
22
|
+
|
|
23
|
+
## Why
|
|
24
|
+
|
|
25
|
+
Some of the main reasons that drove us to create volto-slate instead of
|
|
26
|
+
enhancing Volto's draftjs implementation:
|
|
27
|
+
|
|
28
|
+
- Volto's draftjs implementation depends on draft-js-plugins, a third-party
|
|
29
|
+
project that introduces its own set of bugs and maintanance issues
|
|
30
|
+
- Slate has a modern, developer-friendly api that makes developing plugins
|
|
31
|
+
something easy to do. Getting the editor in a plugin is as easy as `const editor = useSlate()`, overriding core functionality is something that's built
|
|
32
|
+
in as pluggable, directly in Slate.
|
|
33
|
+
|
|
34
|
+
- Volto's draft based implementation depends on Redraft for its final output,
|
|
35
|
+
which comes with its own bugs and issues. While it is nice to have view-mode
|
|
36
|
+
components, this is something that volto-slate implements just as well.
|
|
37
|
+
- Because Slate's internal storage uses a tree modeled on the DOM pattern, its
|
|
38
|
+
final rendered output is very clean. Note: The Slate editor value is a JSON
|
|
39
|
+
object, similar to the Draftjs based implementation.
|
|
40
|
+
|
|
41
|
+
## Upgrades
|
|
42
|
+
|
|
43
|
+
### Upgrade to 4.x.x
|
|
44
|
+
|
|
45
|
+
- Namespace the plugins [#156](https://github.com/eea/volto-slate/pull/156):
|
|
46
|
+
- Make sure you upgrade your slate plugins to use the new slate namespaced plugin ids.
|
|
47
|
+
See for example `volto-slate-footnote` [#23](https://github.com/eea/volto-slate-footnote/pull/23/commits/efdc07041097a6edf608b377141fba15fbee65cf)
|
|
48
|
+
- `asDefault` profile makes the volto-slate as the default Editor for `blocks` and `richtext`.
|
|
49
|
+
- If you're not ready for this, yet, switch to `volto-slate:asDefaultBlock`
|
|
50
|
+
|
|
51
|
+
### Upgrade to 3.x.x
|
|
52
|
+
|
|
53
|
+
- Removed all deprecated, already in Volto Core, `futurevolto` components:
|
|
54
|
+
- `SidebarPopup`
|
|
55
|
+
- `ObjectWidget`
|
|
56
|
+
- `ObjectBrowserWidget`
|
|
57
|
+
- `helpers/Blocks`
|
|
58
|
+
- Table `inline button` and `copy&paste` support is not installed by default anymore.
|
|
59
|
+
You'll need to explicitly import the `tableButton` profile like:
|
|
60
|
+
- `volto:asDefault,tableButton`
|
|
61
|
+
- `volto-slate:minimalDefault,simpleLink,tableButton`
|
|
62
|
+
|
|
63
|
+
## Available profiles.
|
|
64
|
+
|
|
65
|
+
volto-slate provides several optional configuration:
|
|
66
|
+
|
|
67
|
+
- `asDefault` - makes the volto-slate as the default Editor for `blocks` and `richtext`
|
|
68
|
+
- `asDefaultBlock` - makes volto-slate the default Editor for `blocks`
|
|
69
|
+
- `asDefaultRichText` - makes volto-slate the default Editor for `richtext` widget
|
|
70
|
+
- `minimalDefault`, same as the above, but uses a set of toolbar buttons similar to Volto
|
|
71
|
+
- `simpleLink` reuses Volto's link plugin and makes for a better replacement of Volto's rich text editor.
|
|
72
|
+
- `tableButton` adds table button to Slate toolbar in order to easily insert Table block after.
|
|
73
|
+
|
|
74
|
+
## Features
|
|
75
|
+
|
|
76
|
+
#### 1. Hovering (floating) toolbar that shows up on selection
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
#### 2. Optional expanded (fixed) toolbar
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
#### 3. Working with links (internal, external, email)
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
#### 4. Removing links
|
|
89
|
+
|
|
90
|
+

|
|
91
|
+
|
|
92
|
+
#### 5. Editing links
|
|
93
|
+
|
|
94
|
+

|
|
95
|
+
|
|
96
|
+
#### 6. Block-quotes
|
|
97
|
+
|
|
98
|
+

|
|
99
|
+
|
|
100
|
+
#### 7. Split paragraph block in two with `Enter` key and join them back with `Backspace` key
|
|
101
|
+
|
|
102
|
+

|
|
103
|
+
|
|
104
|
+
#### 8. Breaking and joining list items
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
#### 9. Breaking (with expanded selection) and joining list items
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
#### 10. Inserting a new list item at the end
|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
116
|
+
#### 11. Two `Enter` key presses in the last empty list item creates a new list
|
|
117
|
+
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
#### 12. Using `Up` and `Down` keys to go through the blocks in both directions
|
|
121
|
+
|
|
122
|
+

|
|
123
|
+
|
|
124
|
+
#### 13. Changing indent level of list items using `Tab` and `Shift-Tab` keys
|
|
125
|
+
|
|
126
|
+

|
|
127
|
+
|
|
128
|
+
#### 14. Splitting a list block with `Enter` into two list blocks
|
|
129
|
+
|
|
130
|
+

|
|
131
|
+
|
|
132
|
+
#### 15. Support for markdown bulleted lists with `*`, `-` and `+`
|
|
133
|
+
|
|
134
|
+

|
|
135
|
+
|
|
136
|
+
#### 16. Support for markdown numbered lists with `1.` - `9.`
|
|
137
|
+
|
|
138
|
+

|
|
139
|
+
|
|
140
|
+
#### 17. `Backspace` with cursor on first position inside a list with just one item converts the list to a paragraph
|
|
141
|
+
|
|
142
|
+

|
|
143
|
+
|
|
144
|
+
#### 18. Creating a new text block with `Enter` at the end of a text block and removing it with `Backspace`
|
|
145
|
+
|
|
146
|
+

|
|
147
|
+
|
|
148
|
+
#### 19. Switching the list type (numbered list to/from bulleted list)
|
|
149
|
+
|
|
150
|
+

|
|
151
|
+
|
|
152
|
+
## Getting started
|
|
153
|
+
|
|
154
|
+
### Try volto-slate with Docker
|
|
155
|
+
|
|
156
|
+
1. Get the latest Docker images
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
docker pull plone
|
|
160
|
+
docker pull plone/volto
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
1. Start Plone backend
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
1. Start Volto frontend
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
docker run -it --rm -p 3000:3000 --link plone -e ADDONS="volto-slate:asDefault" plone/volto
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
1. Go to http://localhost:3000
|
|
176
|
+
|
|
177
|
+
1. Login with **admin:admin**
|
|
178
|
+
|
|
179
|
+
1. Create a new **Page** and add a new **Text** block.
|
|
180
|
+
|
|
181
|
+
### Add volto-slate to your Volto project
|
|
182
|
+
|
|
183
|
+
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
184
|
+
|
|
185
|
+
1. Start Volto frontend
|
|
186
|
+
|
|
187
|
+
- If you already have a Volto project, just update `package.json`:
|
|
188
|
+
|
|
189
|
+
```JSON
|
|
190
|
+
"addons": [
|
|
191
|
+
"volto-slate:asDefault"
|
|
192
|
+
],
|
|
193
|
+
|
|
194
|
+
"dependencies": {
|
|
195
|
+
"volto-slate": "*"
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
- If not, create one:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
npm install -g yo @plone/generator-volto
|
|
203
|
+
yo @plone/volto my-volto-project --addon volto-slate:asDefault
|
|
204
|
+
cd my-volto-project
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
- Install new add-ons and restart Volto:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
yarn install
|
|
211
|
+
yarn start
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
1. Go to http://localhost:3000
|
|
215
|
+
|
|
216
|
+
1. Happy editing!
|
|
217
|
+
|
|
218
|
+
## Plugins
|
|
219
|
+
|
|
220
|
+
To write a new plugin, please refer [plugins](https://github.com/eea/volto-slate/tree/master/docs/source/volto-slate-plugins.md)
|
|
221
|
+
|
|
222
|
+
## Cypress
|
|
223
|
+
|
|
224
|
+
We aim to achieve a good coverage for cypress. Please refer to commands listed [here](https://github.com/eea/volto-slate/tree/master/docs/source/testing.md) to ease the process of writing new tests.
|
|
225
|
+
|
|
226
|
+
## Copyright and license
|
|
227
|
+
|
|
228
|
+
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
|
229
|
+
All Rights Reserved.
|
|
230
|
+
|
|
231
|
+
See [LICENSE.md](https://github.com/eea/volto-slate/blob/master/LICENSE.md) for details.
|
|
232
|
+
|
|
233
|
+
## Funding
|
|
234
|
+
|
|
235
|
+
[European Environment Agency (EU)](http://eea.europa.eu)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "Insert row before",
|
|
4
|
+
"defaultMessage": "Insert row before"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"id": "Insert row after",
|
|
8
|
+
"defaultMessage": "Insert row after"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "Delete row",
|
|
12
|
+
"defaultMessage": "Delete row"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "Insert col before",
|
|
16
|
+
"defaultMessage": "Insert col before"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "Insert col after",
|
|
20
|
+
"defaultMessage": "Insert col after"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "Delete col",
|
|
24
|
+
"defaultMessage": "Delete col"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "Hide headers",
|
|
28
|
+
"defaultMessage": "Hide headers"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "Make the table sortable",
|
|
32
|
+
"defaultMessage": "Make the table sortable"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "Visible only in view mode",
|
|
36
|
+
"defaultMessage": "Visible only in view mode"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "Fixed width table cells",
|
|
40
|
+
"defaultMessage": "Fixed width table cells"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "Make the table compact",
|
|
44
|
+
"defaultMessage": "Make the table compact"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "Reduce complexity",
|
|
48
|
+
"defaultMessage": "Reduce complexity"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "Divide each row into separate cells",
|
|
52
|
+
"defaultMessage": "Divide each row into separate cells"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "Table color inverted",
|
|
56
|
+
"defaultMessage": "Table color inverted"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "Stripe alternate rows with color",
|
|
60
|
+
"defaultMessage": "Stripe alternate rows with color"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "Left",
|
|
64
|
+
"defaultMessage": "Left"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "Center",
|
|
68
|
+
"defaultMessage": "Center"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "Right",
|
|
72
|
+
"defaultMessage": "Right"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "Bottom",
|
|
76
|
+
"defaultMessage": "Bottom"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "Middle",
|
|
80
|
+
"defaultMessage": "Middle"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "Top",
|
|
84
|
+
"defaultMessage": "Top"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "Table",
|
|
88
|
+
"defaultMessage": "Table"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "Delete table",
|
|
4
|
+
"defaultMessage": "Delete table"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"id": "Insert row before",
|
|
8
|
+
"defaultMessage": "Insert row before"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "Insert row after",
|
|
12
|
+
"defaultMessage": "Insert row after"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "Delete row",
|
|
16
|
+
"defaultMessage": "Delete row"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "Insert col before",
|
|
20
|
+
"defaultMessage": "Insert col before"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "Insert col after",
|
|
24
|
+
"defaultMessage": "Insert col after"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "Delete col",
|
|
28
|
+
"defaultMessage": "Delete col"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "An error has occurred while editing \"{name}\" field. We have been notified and we are looking into it. Please save your work and retry. If the issue persists please contact the site administrator.",
|
|
4
|
+
"defaultMessage": "An error has occurred while editing \"{name}\" field. We have been notified and we are looking into it. Please save your work and retry. If the issue persists please contact the site administrator."
|
|
5
|
+
}
|
|
6
|
+
]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "An error has occurred while rendering \"{name}\" field. We have been notified and we are looking into it. If the issue persists please contact the site administrator.",
|
|
4
|
+
"defaultMessage": "An error has occurred while rendering \"{name}\" field. We have been notified and we are looking into it. If the issue persists please contact the site administrator."
|
|
5
|
+
}
|
|
6
|
+
]
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
#: editor/plugins/Link/index
|
|
15
|
+
msgid "Add link"
|
|
16
|
+
msgstr "Link hinzufügen"
|
|
17
|
+
|
|
18
|
+
#: widgets/HtmlSlateWidget
|
|
19
|
+
msgid "An error has occurred while editing "{name}" field. We have been notified and we are looking into it. Please save your work and retry. If the issue persists please contact the site administrator."
|
|
20
|
+
msgstr ""
|
|
21
|
+
|
|
22
|
+
#: widgets/RichTextWidgetView
|
|
23
|
+
msgid "An error has occurred while rendering "{name}" field. We have been notified and we are looking into it. If the issue persists please contact the site administrator."
|
|
24
|
+
msgstr ""
|
|
25
|
+
|
|
26
|
+
#: blocks/Table/TableBlockEdit
|
|
27
|
+
msgid "Bottom"
|
|
28
|
+
msgstr ""
|
|
29
|
+
|
|
30
|
+
#: blocks/Table/TableBlockEdit
|
|
31
|
+
msgid "Center"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#: blocks/Table/TableBlockEdit
|
|
35
|
+
#: editor/plugins/Table/index
|
|
36
|
+
msgid "Delete col"
|
|
37
|
+
msgstr "Spalte löschen"
|
|
38
|
+
|
|
39
|
+
#: blocks/Table/TableBlockEdit
|
|
40
|
+
#: editor/plugins/Table/index
|
|
41
|
+
msgid "Delete row"
|
|
42
|
+
msgstr "Zeile löschen"
|
|
43
|
+
|
|
44
|
+
#: editor/plugins/Table/index
|
|
45
|
+
msgid "Delete table"
|
|
46
|
+
msgstr ""
|
|
47
|
+
|
|
48
|
+
#: blocks/Table/TableBlockEdit
|
|
49
|
+
msgid "Divide each row into separate cells"
|
|
50
|
+
msgstr "Jede Zeile in einzelne Zellen teilen"
|
|
51
|
+
|
|
52
|
+
#: elementEditor/messages
|
|
53
|
+
msgid "Edit element"
|
|
54
|
+
msgstr "Element bearbeiten"
|
|
55
|
+
|
|
56
|
+
#: editor/plugins/AdvancedLink/index
|
|
57
|
+
#: editor/plugins/Link/index
|
|
58
|
+
msgid "Edit link"
|
|
59
|
+
msgstr "Link bearbeiten"
|
|
60
|
+
|
|
61
|
+
#: blocks/Table/TableBlockEdit
|
|
62
|
+
msgid "Fixed width table cells"
|
|
63
|
+
msgstr "Zellen mit fester Breite"
|
|
64
|
+
|
|
65
|
+
#: blocks/Table/TableBlockEdit
|
|
66
|
+
msgid "Hide headers"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#: blocks/Table/TableBlockEdit
|
|
70
|
+
#: editor/plugins/Table/index
|
|
71
|
+
msgid "Insert col after"
|
|
72
|
+
msgstr "Spalte dahinter einfügen"
|
|
73
|
+
|
|
74
|
+
#: blocks/Table/TableBlockEdit
|
|
75
|
+
#: editor/plugins/Table/index
|
|
76
|
+
msgid "Insert col before"
|
|
77
|
+
msgstr "Spalte davor einfügen"
|
|
78
|
+
|
|
79
|
+
#: blocks/Table/TableBlockEdit
|
|
80
|
+
#: editor/plugins/Table/index
|
|
81
|
+
msgid "Insert row after"
|
|
82
|
+
msgstr "Zeile dahinter einfügen"
|
|
83
|
+
|
|
84
|
+
#: blocks/Table/TableBlockEdit
|
|
85
|
+
#: editor/plugins/Table/index
|
|
86
|
+
msgid "Insert row before"
|
|
87
|
+
msgstr "Zeile davor einfügen"
|
|
88
|
+
|
|
89
|
+
#: blocks/Table/TableBlockEdit
|
|
90
|
+
msgid "Left"
|
|
91
|
+
msgstr ""
|
|
92
|
+
|
|
93
|
+
#: blocks/Table/TableBlockEdit
|
|
94
|
+
msgid "Make the table compact"
|
|
95
|
+
msgstr "Tabelle komprimieren"
|
|
96
|
+
|
|
97
|
+
#: blocks/Table/TableBlockEdit
|
|
98
|
+
msgid "Make the table sortable"
|
|
99
|
+
msgstr ""
|
|
100
|
+
|
|
101
|
+
#: blocks/Table/TableBlockEdit
|
|
102
|
+
msgid "Middle"
|
|
103
|
+
msgstr ""
|
|
104
|
+
|
|
105
|
+
#: blocks/Text/SlashMenu
|
|
106
|
+
msgid "No matching blocks"
|
|
107
|
+
msgstr ""
|
|
108
|
+
|
|
109
|
+
#: blocks/Table/TableBlockEdit
|
|
110
|
+
msgid "Reduce complexity"
|
|
111
|
+
msgstr "Komplexität vereinfachen"
|
|
112
|
+
|
|
113
|
+
#: elementEditor/messages
|
|
114
|
+
msgid "Remove element"
|
|
115
|
+
msgstr "Element entfernen"
|
|
116
|
+
|
|
117
|
+
#: editor/plugins/AdvancedLink/index
|
|
118
|
+
msgid "Remove link"
|
|
119
|
+
msgstr "Link entferenen"
|
|
120
|
+
|
|
121
|
+
#: blocks/Table/TableBlockEdit
|
|
122
|
+
msgid "Right"
|
|
123
|
+
msgstr ""
|
|
124
|
+
|
|
125
|
+
#: blocks/Table/TableBlockEdit
|
|
126
|
+
msgid "Stripe alternate rows with color"
|
|
127
|
+
msgstr "Zeilen im Wechsel einfärben"
|
|
128
|
+
|
|
129
|
+
#: blocks/Table/TableBlockEdit
|
|
130
|
+
msgid "Table"
|
|
131
|
+
msgstr "Tabelle"
|
|
132
|
+
|
|
133
|
+
#: blocks/Table/TableBlockEdit
|
|
134
|
+
msgid "Table color inverted"
|
|
135
|
+
msgstr "Tabellenfarbe invertiert"
|
|
136
|
+
|
|
137
|
+
#: blocks/Table/TableBlockEdit
|
|
138
|
+
msgid "Top"
|
|
139
|
+
msgstr ""
|
|
140
|
+
|
|
141
|
+
#: blocks/Text/DefaultTextBlockEditor
|
|
142
|
+
#: blocks/Text/DetachedTextBlockEditor
|
|
143
|
+
msgid "Type text…"
|
|
144
|
+
msgstr "Text eingeben"
|
|
145
|
+
|
|
146
|
+
#: blocks/Table/TableBlockEdit
|
|
147
|
+
msgid "Visible only in view mode"
|
|
148
|
+
msgstr ""
|