|
|
@@ -1,10 +1,10 @@
|
|
|
// allow only types to import from react
|
|
|
import { ComponentType } from 'react';
|
|
|
|
|
|
-import { Lsx, LsxImmutable } from '@growi/remark-lsx/components';
|
|
|
-import * as lsxGrowiPlugin from '@growi/remark-lsx/services/renderer';
|
|
|
import * as drawioPlugin from '@growi/remark-drawio-plugin';
|
|
|
import growiPlugin from '@growi/remark-growi-plugin';
|
|
|
+import { Lsx, LsxImmutable } from '@growi/remark-lsx/components';
|
|
|
+import * as lsxGrowiPlugin from '@growi/remark-lsx/services/renderer';
|
|
|
import { Schema as SanitizeOption } from 'hast-util-sanitize';
|
|
|
import { SpecialComponents } from 'react-markdown/lib/ast-to-react';
|
|
|
import { NormalComponents } from 'react-markdown/lib/complex-types';
|
|
|
@@ -26,6 +26,7 @@ import { CodeBlock } from '~/components/ReactMarkdownComponents/CodeBlock';
|
|
|
import { DrawioViewerWithEditButton } from '~/components/ReactMarkdownComponents/DrawioViewerWithEditButton';
|
|
|
import { Header } from '~/components/ReactMarkdownComponents/Header';
|
|
|
import { NextLink } from '~/components/ReactMarkdownComponents/NextLink';
|
|
|
+import { Table } from '~/components/ReactMarkdownComponents/Table';
|
|
|
import { TableWithEditButton } from '~/components/ReactMarkdownComponents/TableWithEditButton';
|
|
|
import { RendererConfig } from '~/interfaces/services/renderer';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
|
@@ -38,6 +39,7 @@ import { relativeLinksByPukiwikiLikeLinker } from './rehype-plugins/relative-lin
|
|
|
import * as toc from './rehype-plugins/relocate-toc';
|
|
|
import * as plantuml from './remark-plugins/plantuml';
|
|
|
import { pukiwikiLikeLinker } from './remark-plugins/pukiwiki-like-linker';
|
|
|
+import * as table from './remark-plugins/table';
|
|
|
import * as xsvToTable from './remark-plugins/xsv-to-table';
|
|
|
|
|
|
// import CsvToTable from './PreProcessor/CsvToTable';
|
|
|
@@ -407,6 +409,7 @@ export const generateSimpleViewOptions = (config: RendererConfig, pagePath: stri
|
|
|
drawioPlugin.remarkPlugin,
|
|
|
xsvToTable.remarkPlugin,
|
|
|
lsxGrowiPlugin.remarkPlugin,
|
|
|
+ table.remarkPlugin,
|
|
|
);
|
|
|
if (config.isEnabledLinebreaks) {
|
|
|
remarkPlugins.push(breaks);
|
|
|
@@ -428,6 +431,7 @@ export const generateSimpleViewOptions = (config: RendererConfig, pagePath: stri
|
|
|
if (components != null) {
|
|
|
components.lsx = LsxImmutable;
|
|
|
components.drawio = drawioPlugin.DrawioViewer;
|
|
|
+ components.table = Table;
|
|
|
}
|
|
|
|
|
|
verifySanitizePlugin(options, false);
|
|
|
@@ -446,6 +450,7 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
drawioPlugin.remarkPlugin,
|
|
|
xsvToTable.remarkPlugin,
|
|
|
lsxGrowiPlugin.remarkPlugin,
|
|
|
+ table.remarkPlugin,
|
|
|
);
|
|
|
if (config.isEnabledLinebreaks) {
|
|
|
remarkPlugins.push(breaks);
|
|
|
@@ -468,6 +473,7 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
if (components != null) {
|
|
|
components.lsx = LsxImmutable;
|
|
|
components.drawio = drawioPlugin.DrawioViewer;
|
|
|
+ components.table = Table;
|
|
|
}
|
|
|
|
|
|
// verifySanitizePlugin(options, false);
|