Skip to content

Commit

Permalink
Style: update style
Browse files Browse the repository at this point in the history
  • Loading branch information
stephensu66 committed Aug 24, 2024
1 parent 8189c08 commit 4494ff6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/editors/simple-slate-editor/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useState, useMemo, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Editable, Slate } from 'slate-react';
import { Editor } from 'slate';
import PropTypes from 'prop-types';
import { baseEditor, Toolbar, renderElement, renderLeaf, useHighlight, SetNodeToDecorations } from '../../extension';
import EventBus from '../../utils/event-bus';
import EventProxy from '../../utils/event-handler';
Expand Down
10 changes: 5 additions & 5 deletions src/extension/commons/insert-element-dialog/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, {useState, useCallback, useEffect } from 'react'
import React, {useState, useCallback, useEffect } from 'react';
import { Editor } from 'slate';
import EventBus from '../../../utils/event-bus';
import { INTERNAL_EVENTS } from '../../../constants/event-types';
import { ELementTypes } from '../../constants';
import LinkModal from '../../plugins/link/menu/link-modal';
import { Editor } from 'slate';

const InsertElementDialog = ({ editor }) => {
const [dialogType, setDialogType] = useState('');
Expand Down Expand Up @@ -32,7 +32,7 @@ const InsertElementDialog = ({ editor }) => {
setLinkInfo({ linkTitle: '', linkUrl: '' });
}, []);

if(ELementTypes.LINK === dialogType){
if (ELementTypes.LINK === dialogType) {
return (isOpenLinkModal && (
<LinkModal
onCloseModal={onCloseModal}
Expand All @@ -41,9 +41,9 @@ const InsertElementDialog = ({ editor }) => {
linkUrl={linkInfo.linkUrl}
/>
))
}else{
} else {
return null;
}
};

export default InsertElementDialog;
export default InsertElementDialog;
2 changes: 1 addition & 1 deletion src/extension/plugins/link/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const withLink = (editor) => {
const { selection } = newEditor;
const isCollapsed = Range.isCollapsed(selection);
const eventBus = EventBus.getInstance();
if (isCollapsed){
if (isCollapsed) {
eventBus.dispatch(INTERNAL_EVENTS.INSERT_ELEMENT, { type: ELementTypes.LINK, editor });
} else {
const [firstSelectedNode, ...restNodes] = getSelectedElems(newEditor);
Expand Down

0 comments on commit 4494ff6

Please sign in to comment.