Commit 0e8e928b by Sergey

fix text or all

parent 85d14bbd
...@@ -21,6 +21,9 @@ const App = () => { ...@@ -21,6 +21,9 @@ const App = () => {
maxWidth: '830px', maxWidth: '830px',
margin: '20px 20px 20px 100px', margin: '20px 20px 20px 100px',
}} }}
toolsOptions={{
type: 'all'
}}
/> />
</div> </div>
} }
......
...@@ -32,7 +32,7 @@ import Audio from "./extensions/Audio"; ...@@ -32,7 +32,7 @@ import Audio from "./extensions/Audio";
const initialBubbleItems = ['bold', 'italic', 'underline', 'strike', '|', 'colorText', 'highlight']; const initialBubbleItems = ['bold', 'italic', 'underline', 'strike', '|', 'colorText', 'highlight'];
const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions = { type: 'all' } }) => { const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions = {url: "", errorMessage: ""}, toolsOptions = { type: 'all' } }) => {
global.uploadUrl = uploadOptions.url; global.uploadUrl = uploadOptions.url;
const [innerModalType, setInnerModalType] = useState(null); const [innerModalType, setInnerModalType] = useState(null);
...@@ -291,25 +291,25 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions ...@@ -291,25 +291,25 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
voicemessage: { voicemessage: {
title: 'Записать голосовое сообщение', title: 'Записать голосовое сообщение',
onClick: () => { onClick: () => {
modalOpener('voicemessage', 'Записать голосовое сообщение')
setRecordType({audio: true}) setRecordType({audio: true})
clearBlobUrl() clearBlobUrl()
modalOpener('voicemessage', 'Записать голосовое сообщение')
} }
}, },
webcamera: { webcamera: {
title: 'Записать с камеры', title: 'Записать с камеры',
onClick: () => { onClick: () => {
modalOpener('webcamera', 'Записать с камеры')
setRecordType({video: true}) setRecordType({video: true})
clearBlobUrl() clearBlobUrl()
modalOpener('webcamera', 'Записать с камеры')
} }
}, },
screencust: { screencust: {
title: 'Записать экран', title: 'Записать экран',
onClick: () => { onClick: () => {
modalOpener('screencust', 'Записать экран')
setRecordType({screen: true}) setRecordType({screen: true})
clearBlobUrl() clearBlobUrl()
modalOpener('screencust', 'Записать экран')
} }
}, },
// katex: { // katex: {
...@@ -891,12 +891,12 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions ...@@ -891,12 +891,12 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions, toolsOptions
break break
} }
clearBlobUrl();
setUploaderUid(`uid${new Date()}`); setUploaderUid(`uid${new Date()}`);
setEmbedContent(''); setEmbedContent('');
setUploadedPaths([]); setUploadedPaths([]);
setModalTitle(''); setModalTitle('');
setModalIsOpen(false); setModalIsOpen(false);
clearBlobUrl()
} catch (err) { } catch (err) {
console.log(err) console.log(err)
} }
......
...@@ -130,14 +130,6 @@ const toolsInit = { ...@@ -130,14 +130,6 @@ const toolsInit = {
'hardBreak', 'hardBreak',
] ]
}, },
{
type: 'g',
items: [
'voicemessage',
'webcamera',
'screencust'
]
},
] ]
} }
......
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