Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Refs #126375 prettier fixes for text index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ichim-david committed Feb 19, 2021
1 parent e21f81c commit 9d4d7cd
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/blocks/Text/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import codeSVG from "@plone/volto/icons/code.svg";
import TextBlockView from "./TextBlockView";
import TextBlockEdit from "./TextBlockEdit";
import TextBlockSchema from "./TextBlockSchema";
import codeSVG from '@plone/volto/icons/code.svg';
import TextBlockView from './TextBlockView';
import TextBlockEdit from './TextBlockEdit';
import TextBlockSchema from './TextBlockSchema';

import {
goDown,
Expand All @@ -13,19 +13,19 @@ import {
softBreak,
moveListItemDown,
moveListItemUp,
} from "./keyboard";
import { withDeleteSelectionOnEnter } from "volto-slate/editor/extensions";
} from './keyboard';
import { withDeleteSelectionOnEnter } from 'volto-slate/editor/extensions';
import {
withSplitBlocksOnBreak,
withDeserializers,
breakList,
} from "./extensions";
import { extractImages } from "volto-slate/editor/plugins/Image/deconstruct";
import { extractTables } from "volto-slate/blocks/Table/deconstruct";
} from './extensions';
import { extractImages } from 'volto-slate/editor/plugins/Image/deconstruct';
import { extractTables } from 'volto-slate/blocks/Table/deconstruct';

export TextBlockView from "./TextBlockView";
export TextBlockEdit from "./TextBlockEdit";
export TextBlockSchema from "./TextBlockSchema";
export TextBlockView from './TextBlockView';
export TextBlockEdit from './TextBlockEdit';
export TextBlockSchema from './TextBlockSchema';

export default (config) => {
config.settings.slate = {
Expand Down Expand Up @@ -74,21 +74,21 @@ export default (config) => {
],

// These elements will get an id, to make them targets in TOC
topLevelTargetElements: ["h1", "h2", "h3", "h4"],
topLevelTargetElements: ['h1', 'h2', 'h3', 'h4'],

...config.settings.slate, // TODO: is this correct for volto-slate addons?
};

config.settings.integratesBlockStyles = [
...(config.settings.integratesBlockStyles || []),
"slate",
'slate',
];

config.blocks.blocksConfig.slate = {
id: "slate",
title: "Text",
id: 'slate',
title: 'Text',
icon: codeSVG,
group: "text",
group: 'text',
view: TextBlockView,
edit: TextBlockEdit,
schema: TextBlockSchema,
Expand All @@ -106,7 +106,7 @@ export default (config) => {
},
tocEntry: (block = {}, tocData) => {
// integration with volto-block-toc
const headlines = ["h1", "h2", "h3", "h4", "h5", "h6"];
const headlines = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
const { value, override_toc, entry_text, level, plaintext } = block;
const type = value?.[0]?.type;
return override_toc && level
Expand Down

0 comments on commit 9d4d7cd

Please sign in to comment.