Commit 806336fc by Яков

add glossary

parent 41d4e8d8
......@@ -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'/>
......
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