Commit 0dc48469 authored by Яков's avatar Яков
Browse files

update fix issue

parent a6ac6046
{ {
"name": "react-ag-qeditor", "name": "react-ag-qeditor",
"version": "1.1.64", "version": "1.1.65",
"description": "WYSIWYG html editor", "description": "WYSIWYG html editor",
"author": "atma", "author": "atma",
"license": "MIT", "license": "MIT",
......
...@@ -185,7 +185,8 @@ const QEditor = ({ ...@@ -185,7 +185,8 @@ const QEditor = ({
onChange = () => {}, onChange = () => {},
style, style,
uploadOptions = {url: '', errorMessage: ''}, uploadOptions = {url: '', errorMessage: ''},
toolsOptions = {type: 'all'} toolsOptions = {type: 'all'},
onInfo
}) => { }) => {
global.uploadUrl = uploadOptions.url global.uploadUrl = uploadOptions.url
...@@ -1864,7 +1865,7 @@ const QEditor = ({ ...@@ -1864,7 +1865,7 @@ const QEditor = ({
return ( return (
<div className='atma-editor-wrap' style={style}> <div className='atma-editor-wrap' style={style}>
<div className='atma-editor'> <div className='atma-editor'>
<ToolBar editor={editor} {...{toolsOptions}} {...{toolsLib}} /> <ToolBar editor={editor} {...{toolsOptions}} {...{toolsLib}} onInfo={onInfo} />
<BubbleMenu <BubbleMenu
typpyOptions={{followCursor: true}} typpyOptions={{followCursor: true}}
editor={editor} editor={editor}
......
...@@ -109,7 +109,7 @@ const toolsInit = { ...@@ -109,7 +109,7 @@ const toolsInit = {
] ]
} }
const ToolBar = ({ editor, toolsLib = [], toolsOptions }) => { const ToolBar = ({ editor, toolsLib = [], toolsOptions, onInfo }) => {
if (!editor) { if (!editor) {
return null return null
} }
...@@ -356,19 +356,20 @@ const ToolBar = ({ editor, toolsLib = [], toolsOptions }) => { ...@@ -356,19 +356,20 @@ const ToolBar = ({ editor, toolsLib = [], toolsOptions }) => {
return ( return (
<div className="atma-editor-toolbar"> <div className="atma-editor-toolbar">
{ getItems() } { getItems() }
<a {onInfo && (
href="https://info.atmaguru.online/books/rukovodstvo-administratora-atmaguru/page/redaktor-i-ego-funkcii" <button
target="_blank" type="button"
rel="noopener noreferrer"
className="atma-editor-toolbar-info" className="atma-editor-toolbar-info"
title="Справка по редактору" title="Справка по редактору"
onClick={onInfo}
> >
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="9" cy="9" r="8" stroke="currentColor" strokeWidth="1.5"/> <circle cx="9" cy="9" r="8" stroke="currentColor" strokeWidth="1.5"/>
<path d="M9 8v5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/> <path d="M9 8v5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>
<circle cx="9" cy="5.5" r="0.75" fill="currentColor"/> <circle cx="9" cy="5.5" r="0.75" fill="currentColor"/>
</svg> </svg>
</a> </button>
)}
</div> </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