Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
lib
react-ag-qeditor
Commits
c2c9d3d2
Commit
c2c9d3d2
authored
May 11, 2022
by
Рамис
Browse files
fix bug
parent
10d4b78a
Changes
5
Show whitespace changes
Inline
Side-by-side
README.md
View file @
c2c9d3d2
...
@@ -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
...
...
example/src/App.js
View file @
c2c9d3d2
...
@@ -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
>
...
...
package.json
View file @
c2c9d3d2
{
{
"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
"
,
...
...
src/QEditor.jsx
View file @
c2c9d3d2
...
@@ -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
>
))
))
}
}
...
...
src/index.scss
View file @
c2c9d3d2
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment