Commit a849f72d by devTvenks

fix: fixed images in editor

parent ee1929b9
...@@ -960,12 +960,11 @@ const QEditor = ({ ...@@ -960,12 +960,11 @@ const QEditor = ({
return false return false
} }
} }
try { try {
switch (innerModalType) { switch (innerModalType) {
case 'image': case 'image':
uploadedPaths.map((file, i) => { uploadedPaths.map((file, i) => {
editor.chain().focus().setImage({ src: file.path }) editor.chain().focus().setImage({ src: file.path }).run();
}) })
break break
case 'video': case 'video':
......
...@@ -116,6 +116,7 @@ export default class Uploader extends React.Component { ...@@ -116,6 +116,7 @@ export default class Uploader extends React.Component {
className={ 'atma-editor-uploader-uitems-elem' + (this.modalType === 'file' ? ' atma-editor-uploader-file' : '' ) } className={ 'atma-editor-uploader-uitems-elem' + (this.modalType === 'file' ? ' atma-editor-uploader-file' : '' ) }
style={{ backgroundImage: `url(${this.state.files[uid].path})` }} style={{ backgroundImage: `url(${this.state.files[uid].path})` }}
data-url={ this.state.files[uid].path } data-url={ this.state.files[uid].path }
key={`key_${i}`}
> >
<div className={'atma-editor-uploader-uitems-del'} title={'Удалить'} onClick={()=> this.abortUpload({ uid }) } /> <div className={'atma-editor-uploader-uitems-del'} title={'Удалить'} onClick={()=> this.abortUpload({ uid }) } />
{ {
......
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