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

custom tags

parent 0f0c9ff7
No related branches found
No related tags found
1 merge request!429Move components
......@@ -11,7 +11,3 @@ export { default as Tabs } from './src/ui/tabs/Tabs';
export { default as BlockLevelTools } from './src/ui/tabs/BlockLevelTools';
export { default as EditorInfoTool } from './src/components/EditorInfo/CounterInfo/EditorInfoTool';
export { default as EditorShortCutsTool } from './src/components/EditorInfo/EditorShortCutsTool';
export { default as CustomTagInlineComponent } from './src/components/customtag/CustomTagInlineComponent';
export { default as CustomTagInlineOverlayComponent } from './src/components/customtag/CustomTagInlineOverlayCompoment';
export { default as CustomTagBlockComponent } from './src/components/customtag/CustomTagBlockComponent';
......@@ -2,7 +2,7 @@
import React, { useState } from 'react';
import { th } from '@pubsweet/ui-toolkit';
import styled from 'styled-components';
import CustomTagBlockComponent from '../../components/customtag/CustomTagBlockComponent';
import CustomTagBlockComponent from './CustomTagBlockComponent';
import OENToolGroup from './OENToolGroup';
import BlockElement from './BlockElement';
import Icon from '../../helpers/Icon';
......
......@@ -2,7 +2,7 @@ import React, { useContext, useMemo, useRef, useState, useEffect } from 'react';
import styled, { css } from 'styled-components';
import { WaxContext } from 'wax-prosemirror-core';
import { v4 as uuidv4 } from 'uuid';
import MenuButton from '../../ui/buttons/MenuButton';
import MenuButton from '../buttons/MenuButton';
const activeStyles = css`
pointer-events: none;
......
import { Service } from 'wax-prosemirror-core';
import { CustomTagInlineOverlayComponent } from 'wax-prosemirror-components';
import CustomTagInlineOverlayComponent from '../components/CustomTagInlineOverlayComponent';
import customtagInlineMark from './schema/customtagInlineMark';
import CustomTagInlineTool from './CustomTagInlineTool';
......
import React from 'react';
import { v4 as uuidv4 } from 'uuid';
import { CustomTagInlineComponent } from 'wax-prosemirror-components';
import { Tools } from 'wax-prosemirror-core';
import CustomTagInlineComponent from '../components/CustomTagInlineComponent';
class CustomTagInLineTool extends Tools {
title = 'Custom Tag Inline';
......
import React, { useMemo, useState, useContext } from 'react';
import { WaxContext } from 'wax-prosemirror-core';
import styled from 'styled-components';
import MenuButton from '../../ui/buttons/MenuButton';
import { WaxContext } from 'wax-prosemirror-core';
import { MenuButton } from 'wax-prosemirror-components';
const StyledButton = styled(MenuButton)`
svg {
......
......@@ -10,7 +10,7 @@ import styled from 'styled-components';
import { grid, th } from '@pubsweet/ui-toolkit';
import { WaxContext } from 'wax-prosemirror-core';
import { v4 as uuidv4 } from 'uuid';
import Icon from '../../helpers/Icon';
import { Icon } from 'wax-prosemirror-components';
const IconRemove = styled(Icon)`
cursor: pointer;
......@@ -80,7 +80,7 @@ const Item = styled.div`
const initialArr = [];
const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => {
const CustomTagInlineOverlayComponent = ({ mark }) => {
const ref = useRef(null);
const [inputValue, setInputValue] = useState('');
......@@ -111,7 +111,7 @@ const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => {
const [allTags, setAllTags] = useState(configTags);
let image = false;
state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {
state.doc.nodesBetween($from.pos, $to.pos, node => {
if (node.type.name === 'image') {
image = true;
}
......
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