Skip to content
Snippets Groups Projects
Commit 327c15c6 authored by chris's avatar chris
Browse files

remove CharacterList from components

parent 629540bb
No related branches found
No related tags found
1 merge request!383Rename contect view
...@@ -53,6 +53,8 @@ import invisibles, { ...@@ -53,6 +53,8 @@ import invisibles, {
paragraph, paragraph,
} from '@guardian/prosemirror-invisibles'; } from '@guardian/prosemirror-invisibles';
import CharactersList from './CharactersList';
// const updateTitle = title => { // const updateTitle = title => {
// console.log(title); // console.log(title);
// }; // };
...@@ -116,6 +118,7 @@ export default { ...@@ -116,6 +118,7 @@ export default {
// OrderedListService: { subList: false }, // OrderedListService: { subList: false },
// BulletListService: { subList: false }, // BulletListService: { subList: false },
// JoinUpService: { subList: false }, // JoinUpService: { subList: false },
SpecialCharactersService: CharactersList,
SchemaService: EditoriaSchema, SchemaService: EditoriaSchema,
TitleService: { updateTitle }, TitleService: { updateTitle },
RulesService: [emDash, ellipsis], RulesService: [emDash, ellipsis],
......
...@@ -11,7 +11,6 @@ import { grid, th, override } from '@pubsweet/ui-toolkit'; ...@@ -11,7 +11,6 @@ import { grid, th, override } from '@pubsweet/ui-toolkit';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { WaxContext } from 'wax-prosemirror-core'; import { WaxContext } from 'wax-prosemirror-core';
import { filter, groupBy, debounce } from 'lodash'; import { filter, groupBy, debounce } from 'lodash';
import CharactersList from './CharactersList';
const Wrapper = styled.div` const Wrapper = styled.div`
width: 400px; width: 400px;
...@@ -109,10 +108,12 @@ const SpecialCharacter = styled.div` ...@@ -109,10 +108,12 @@ const SpecialCharacter = styled.div`
const SpecialCharactersComponent = ({ close }) => { const SpecialCharactersComponent = ({ close }) => {
const searchRef = useRef(null); const searchRef = useRef(null);
const { activeView } = useContext(WaxContext); const { activeView, app } = useContext(WaxContext);
const [searchValue, setSearchValue] = useState(''); const [searchValue, setSearchValue] = useState('');
const [isFirstRun, setFirstRun] = useState(true); const [isFirstRun, setFirstRun] = useState(true);
const CharactersList = app.config.get('config.SpecialCharactersService');
const [specialCharactersList, setSpecialCharactersList] = useState( const [specialCharactersList, setSpecialCharactersList] = useState(
CharactersList, CharactersList,
); );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment