Commit 07a7f9fd by Яков

add glossary

parent d80102db
{
"name": "react-ag-qeditor",
"version": "1.0.50",
"version": "1.0.51",
"description": "WYSIWYG html editor",
"author": "atma",
"license": "MIT",
......@@ -28,8 +28,6 @@
"start:both": "concurrently \"npm start\" \"cd example && npm start\""
},
"peerDependencies": {
"@ant-design/icons": "^5.0.0",
"antd": "^5.0.0",
"@tiptap/extension-table": "^2.11.7",
"@tiptap/pm": "^2.11.7",
"prosemirror-tables": "^1.4.0",
......@@ -61,7 +59,6 @@
"dist"
],
"dependencies": {
"@ant-design/icons": "5.6.1",
"@babel/plugin-proposal-unicode-property-regex": "^7.18.6",
"@tiptap/core": "^2.0.0-beta.176",
"@tiptap/extension-color": "^2.0.0-beta.9",
......@@ -80,7 +77,6 @@
"@tiptap/extension-underline": "^2.0.0-beta.23",
"@tiptap/react": "^2.0.0-beta.109",
"@tiptap/starter-kit": "^2.0.0-beta.185",
"antd": "5.x",
"axios": "^0.27.2",
"katex": "^0.15.3",
"prosemirror-state": "1.4.0",
......
......@@ -13,7 +13,7 @@ import TableCell from '@tiptap/extension-table-cell'
import TableRow from '@tiptap/extension-table-row'
import TableHeader from '@tiptap/extension-table-header'
import Focus from '@tiptap/extension-focus'
import { Input, Modal, Form, Button, message } from "antd";
// import { Input, Modal, Form, Button, message } from "antd";
// import Link from '@tiptap/extension-link'
// import Image from '@tiptap/extension-image'
import TextAlign from '@tiptap/extension-text-align'
......@@ -1283,68 +1283,68 @@ const QEditor = ({
{getInnerModal()}
{buildActionsModal(buttons)}
</EditorModal>
<Modal
width={1100}
open={modalGlossaryIsOpen}
title={'Добавить слово'}
onCancel={()=>{
setModalGlossaryIsOpen(false);
}}
footer={[
<Button key={1}
size={'middle'}
type={'text'}
onClick={()=>{
setModalGlossaryIsOpen(false);
}}>Отменить</Button>,
<Button key={2}
size={'middle'}
type={'primary'}
htmlType={'submit'}
form={'form-glossary'}
>Сохранить</Button>
]}
>
<Form
name={'form-glossary'}
initialValues={{word : wordGlossary}}
labelCol={{span: 8}}
wrapperCol={{span: 32}}
layout="vertical"
size="middle"
style={{margin: '30px'}}
onFinish={(values) => {
editWord(values);
}}
>
<Form.Item name="id" style={{'display': 'none'}}>
<input type="hidden"/>
</Form.Item>
<Form.Item
label={'Термин'}
name="word"
rules={[
{
required: true,
message: 'Обязательное поле',
type:"string"
},
{ min: 2, message: 'Минимум 2 символа' },
{ max: 254, message: 'Максимум 254 символов' },
]}
>
<Input placeholder={'Термин'}/>
</Form.Item>
{/*<Modal*/}
{/* width={1100}*/}
{/* open={modalGlossaryIsOpen}*/}
{/* title={'Добавить слово'}*/}
{/* onCancel={()=>{*/}
{/* setModalGlossaryIsOpen(false);*/}
{/* }}*/}
{/* footer={[*/}
{/* <Button key={1}*/}
{/* size={'middle'}*/}
{/* type={'text'}*/}
{/* onClick={()=>{*/}
{/* setModalGlossaryIsOpen(false);*/}
{/* }}>Отменить</Button>,*/}
{/* <Button key={2}*/}
{/* size={'middle'}*/}
{/* type={'primary'}*/}
{/* htmlType={'submit'}*/}
{/* form={'form-glossary'}*/}
{/* >Сохранить</Button>*/}
{/* ]}*/}
{/*>*/}
{/* <Form*/}
{/* name={'form-glossary'}*/}
{/* initialValues={{word : wordGlossary}}*/}
{/* labelCol={{span: 8}}*/}
{/* wrapperCol={{span: 32}}*/}
{/* layout="vertical"*/}
{/* size="middle"*/}
{/* style={{margin: '30px'}}*/}
{/* onFinish={(values) => {*/}
{/* editWord(values);*/}
{/* }}*/}
{/* >*/}
{/* <Form.Item name="id" style={{'display': 'none'}}>*/}
{/* <input type="hidden"/>*/}
{/* </Form.Item>*/}
{/* <Form.Item*/}
{/* label={'Термин'}*/}
{/* name="word"*/}
{/* rules={[*/}
{/* {*/}
{/* required: true,*/}
{/* message: 'Обязательное поле',*/}
{/* type:"string"*/}
{/* },*/}
{/* { min: 2, message: 'Минимум 2 символа' },*/}
{/* { max: 254, message: 'Максимум 254 символов' },*/}
{/* ]}*/}
{/* >*/}
{/* <Input placeholder={'Термин'}/>*/}
{/* </Form.Item>*/}
<Form.Item
name="description"
label={'Краткое описание'}
rules={[{required: true, type: 'string', message: 'Обязательное поле' }]}
>
<TextArea showCount={true} maxLength={1000} placeholder={'Краткое описание'}/>
</Form.Item>
</Form>
</Modal>
{/* <Form.Item*/}
{/* name="description"*/}
{/* label={'Краткое описание'}*/}
{/* rules={[{required: true, type: 'string', message: 'Обязательное поле' }]}*/}
{/* >*/}
{/* <TextArea showCount={true} maxLength={1000} placeholder={'Краткое описание'}/>*/}
{/* </Form.Item>*/}
{/* </Form>*/}
{/*</Modal>*/}
</div>
)
}
......
Markdown is supported
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