Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-ag-qeditor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lib
react-ag-qeditor
Commits
806336fc
Commit
806336fc
authored
Apr 15, 2025
by
Яков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add glossary
parent
41d4e8d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
QEditor.jsx
src/QEditor.jsx
+24
-20
No files found.
src/QEditor.jsx
View file @
806336fc
...
...
@@ -1248,27 +1248,31 @@ const QEditor = ({
)
}
})
}
<
div
key=
{
'bubbleItems-glossary'
}
className=
{
'qicon qglossary'
}
title=
{
'Добавить в глоссарий'
}
onClick=
{
()
=>
{
if
(
!
editor
.
state
.
selection
.
empty
)
{
const
selectedText
=
editor
.
state
.
doc
.
textBetween
(
editor
.
state
.
selection
.
from
,
editor
.
state
.
selection
.
to
,
" "
);
setWordGlossary
(
selectedText
);
setTimeout
(()
=>
{
setModalGlossaryIsOpen
(
true
);
},
100
)
{
window
.
location
.
pathname
.
includes
(
'admin/maps'
)
&&
<
div
key=
{
'bubbleItems-glossary'
}
className=
{
'qicon qglossary'
}
// console.log(editor.chain().focus());
}
}
/>
title=
{
'Добавить в глоссарий'
}
onClick=
{
()
=>
{
if
(
!
editor
.
state
.
selection
.
empty
)
{
const
selectedText
=
editor
.
state
.
doc
.
textBetween
(
editor
.
state
.
selection
.
from
,
editor
.
state
.
selection
.
to
,
" "
);
setWordGlossary
(
selectedText
);
setTimeout
(()
=>
{
setModalGlossaryIsOpen
(
true
);
},
100
)
}
// console.log(editor.chain().focus());
}
}
/>
}
</
div
>
</
BubbleMenu
>
<
EditorContent
editor=
{
editor
}
className=
'atma-editor-content'
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment