Commit c2c9d3d2 by Рамис

fix bug

parent 10d4b78a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
## Install ## Install
```bash ```bash
npm install --save https://gitlab.atma.company/lib/react-ag-qeditor.git npm install --save git+https://gitlab.atma.company/lib/react-ag-qeditor.git
``` ```
## Usage ## Usage
......
...@@ -6,7 +6,7 @@ import 'react-ag-qeditor/dist/index.css' ...@@ -6,7 +6,7 @@ import 'react-ag-qeditor/dist/index.css'
const App = () => { const App = () => {
return <div style={{padding:40}}> return <div style={{padding:40}}>
<QEditor value={'<p>asds</p>'} onChange={(value)=>{ <QEditor value={'<span style="font-size: 20px;">asds</span>'} onChange={(value)=>{
console.log('sads', value); console.log('sads', value);
}} /> }} />
</div> </div>
......
{ {
"name": "react-ag-qeditor", "name": "react-ag-qeditor",
"version": "0.0.2", "version": "0.0.3",
"description": "WYSIWYG html editor", "description": "WYSIWYG html editor",
"author": "atma", "author": "atma",
"license": "MIT", "license": "MIT",
......
...@@ -24,6 +24,7 @@ export default class QEditor extends React.Component { ...@@ -24,6 +24,7 @@ export default class QEditor extends React.Component {
Quill.register('formats/video', VideoBlot) Quill.register('formats/video', VideoBlot)
Quill.register('formats/videoLocal', VideoLocalBlot) Quill.register('formats/videoLocal', VideoLocalBlot)
} }
componentDidMount () { componentDidMount () {
...@@ -90,7 +91,7 @@ export default class QEditor extends React.Component { ...@@ -90,7 +91,7 @@ export default class QEditor extends React.Component {
<div className={'atma-editor-modal-action'}> <div className={'atma-editor-modal-action'}>
{ {
buttons.map((btn, i) => ( buttons.map((btn, i) => (
<button key={'mAction' + i} className={'atma-editor-btn' + btn.className} <button type={'button'} key={'mAction' + i} className={'atma-editor-btn' + btn.className}
onClick={btn.onClick}>{btn.title}</button> onClick={btn.onClick}>{btn.title}</button>
)) ))
} }
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
} }
} }
.ql-toolbar{ .ql{
&-toolbar{
&.ql-snow{ &.ql-snow{
position: sticky; position: sticky;
top: 0; top: 0;
...@@ -32,11 +33,18 @@ ...@@ -32,11 +33,18 @@
} }
} }
.ql-editor{ &-editor{
min-height: 350px; min-height: 350px;
max-height: 800px; max-height: 800px;
} }
&-container{
font-size: 16px;
}
}
&-modal{ &-modal{
position: fixed; position: fixed;
top: 0; top: 0;
......
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