Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions demo/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
} from '../src';
import type {EscapeConfig, ToolbarActionData} from '../src/bundle/Editor';
import {Extension} from '../src/cm/state';
import {FoldingHeading} from '../src/extensions/yfm/FoldingHeading';
import {Math} from '../src/extensions/yfm/Math';
import {Mermaid} from '../src/extensions/yfm/Mermaid';
import {YfmHtmlBlock} from '../src/extensions/yfm/YfmHtmlBlock';
import {getSanitizeYfmHtmlBlock} from '../src/extensions/yfm/YfmHtmlBlock/utils';
import {FoldingHeading} from '../src/extensions/additional/FoldingHeading';
import {Math} from '../src/extensions/additional/Math';
import {Mermaid} from '../src/extensions/additional/Mermaid';
import {YfmHtmlBlock} from '../src/extensions/additional/YfmHtmlBlock';
import {getSanitizeYfmHtmlBlock} from '../src/extensions/additional/YfmHtmlBlock/utils';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets rename yfmHtmlBlick to HtmlBlock

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but in separate pull request

import {cloneDeep} from '../src/lodash';
import {CodeEditor} from '../src/markup/editor';
import type {FileUploadHandler} from '../src/utils/upload';
Expand All @@ -43,7 +43,7 @@

const b = block('playground');
const fileUploadHandler: FileUploadHandler = async (file) => {
console.info('[Playground] Uploading file: ' + file.name);

Check warning on line 46 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

Unexpected console statement
await randomDelay(1000, 3000);
return {url: URL.createObjectURL(file)};
};
Expand Down Expand Up @@ -103,8 +103,8 @@
>;

logger.setLogger({
metrics: console.info,

Check warning on line 106 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

Unexpected console statement
action: (data) => console.info(`Action: ${data.action}`, data),

Check warning on line 107 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

Unexpected console statement
...console,
});

Expand Down Expand Up @@ -236,14 +236,14 @@
setEditorMode(mode);
}
const onToolbarAction = ({id, editorMode: type}: ToolbarActionData) => {
console.info(`The '${id}' action is performed in the ${type}-editor.`);

Check warning on line 239 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

Unexpected console statement
};
function onChangeSplitModeEnabled({splitModeEnabled}: {splitModeEnabled: boolean}) {
props.onChangeSplitModeEnabled?.(splitModeEnabled);
console.info(`Split mode enabled: ${splitModeEnabled}`);

Check warning on line 243 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

Unexpected console statement
}
function onChangeToolbarVisibility({visible}: {visible: boolean}) {
console.info('Toolbar visible: ' + visible);

Check warning on line 246 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

Unexpected console statement
}

mdEditor.on('cancel', onCancel);
Expand All @@ -263,7 +263,7 @@
mdEditor.off('change-split-mode-enabled', onChangeSplitModeEnabled);
mdEditor.off('change-toolbar-visibility', onChangeToolbarVisibility);
};
}, [mdEditor]);

Check warning on line 266 in demo/Playground.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect

return (
<div className={b()}>
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/config/wysiwyg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {ActionStorage} from 'src/core';

import {headingType, pType} from '../../extensions';
import {gptHotKeys} from '../../extensions/additional/GPT/constants';
// for typings from Math
import type {} from '../../extensions/additional/Math';
import type {
SelectionContextConfig,
SelectionContextItemData,
} from '../../extensions/behavior/SelectionContext';
// for typings from Math
import type {} from '../../extensions/yfm/Math';
import {i18n as i18nHint} from '../../i18n/hints';
import {i18n} from '../../i18n/menubar';
import {Action as A, formatter as f} from '../../shortcuts';
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {YfmHeadingAttr, headingNodeName, type HeadingLevel} from '../YfmHeading/const';
export {YfmHeadingAttr, headingNodeName, type HeadingLevel} from '../../yfm/YfmHeading/const';
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {Node} from 'prosemirror-model';
import {Plugin} from 'prosemirror-state';
import {Decoration, DecorationSet, NodeView} from 'prosemirror-view';

import type {ReactRenderer, RendererItem} from '../../../extensions/behavior/ReactRenderer';
import {isTextSelection} from '../../../utils/selection';
import type {ReactRenderer, RendererItem} from '../../behavior/ReactRenderer';

import {moveCursorLeftOfMathInline, moveCursorRightOfMathInline} from './commands';
import {CLASSNAMES, MathNode} from './const';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {builders} from 'prosemirror-test-builder';

import {createMarkupChecker} from '../../../../tests/sameMarkup';
import {ExtensionsManager} from '../../../core';
import {BaseNode, BaseSchemaSpecs} from '../../../extensions/specs';
import {BaseNode, BaseSchemaSpecs} from '../../specs';

import {MermaidSpecs} from './MermaidSpecs';
import {MermaidAttrs, mermaidNodeName} from './const';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {builders} from 'prosemirror-test-builder';

import {createMarkupChecker} from '../../../../tests/sameMarkup';
import {ExtensionsManager} from '../../../core';
import {BaseNode, BaseSchemaSpecs} from '../../../extensions/specs';
import {BaseNode, BaseSchemaSpecs} from '../../specs';

import {YfmHtmlBlockSpecs} from './YfmHtmlBlockSpecs';
import {YfmHtmlBlockAttrs, yfmHtmlBlockNodeName} from './const';
Expand Down
Loading