Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-ag-qeditor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lib
react-ag-qeditor
Commits
6fed9ce9
Commit
6fed9ce9
authored
May 10, 2022
by
Рамис
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add onChange func
parent
d79674e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
App.js
example/src/App.js
+3
-1
QEditor.jsx
src/QEditor.jsx
+7
-3
No files found.
example/src/App.js
View file @
6fed9ce9
...
...
@@ -6,7 +6,9 @@ import 'react-ag-qeditor/dist/index.css'
const
App
=
()
=>
{
return
<
div
style
=
{{
padding
:
40
}}
>
<
QEditor
/>
<
QEditor
value
=
{
'<p>asds</p>'
}
onChange
=
{(
value
)
=>
{
console
.
log
(
'sads'
,
value
);
}}
/
>
<
/div
>
}
...
...
src/QEditor.jsx
View file @
6fed9ce9
...
...
@@ -187,7 +187,7 @@ export default class QEditor extends React.Component {
window
.
katex
=
katex
;
if
(
!
this
.
state
.
init
)
{
if
(
!
this
.
state
.
init
)
{
return
null
;
}
return
(
...
...
@@ -198,7 +198,9 @@ export default class QEditor extends React.Component {
ref=
{
ref
=>
this
.
quillRef
=
ref
}
defaultValue=
{
value
}
theme=
"snow"
onChange=
{
(
value
)
=>
{
console
.
log
(
value
)}
}
onChange=
{
value
=>
{
this
.
props
.
onChange
(
value
)
}
}
modules=
{
this
.
modules
}
formats=
{
this
.
formats
}
onChangeSelection=
{
(
range
,
source
,
editor
)
=>
{
...
...
@@ -240,5 +242,7 @@ export default class QEditor extends React.Component {
QEditor
.
defaultProps
=
{
maxWidth
:
'auto'
,
maxHeight
:
1000
maxHeight
:
1000
,
onChange
:
()
=>
{},
lang
:
'ru'
}
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