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
8b985ff5
Commit
8b985ff5
authored
May 14, 2025
by
Яков
Browse files
try fix
parent
3e5a0a97
Changes
2
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
8b985ff5
{
{
"name"
:
"react-ag-qeditor"
,
"name"
:
"react-ag-qeditor"
,
"version"
:
"1.0.6
4
"
,
"version"
:
"1.0.6
5
"
,
"description"
:
"WYSIWYG html editor"
,
"description"
:
"WYSIWYG html editor"
,
"author"
:
"atma"
,
"author"
:
"atma"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
...
...
src/QEditor.jsx
View file @
8b985ff5
...
@@ -459,25 +459,26 @@ const QEditor = ({
...
@@ -459,25 +459,26 @@ const QEditor = ({
const
editor
=
useEditor
({
const
editor
=
useEditor
({
extensions
:
[
extensions
:
[
StarterKit
,
StarterKit
,
//
Underline,
Underline
,
// Image,
// Image,
//
ImageResize,
ImageResize
,
// CustomImage,
// CustomImage,
// Link.configure({
Link
.
configure
({
// autolink: true,
autolink
:
true
,
// linkOnPaste: true,
linkOnPaste
:
true
,
// defaultProtocol: 'https',
defaultProtocol
:
'
https
'
,
// protocols: ['http', 'https'],
protocols
:
[
'
http
'
,
'
https
'
],
// validate: (href)=> console.log(href),
validate
:
(
href
)
=>
console
.
log
(
href
),
// }),
}),
// Video,
Video
,
// Iframe,
Iframe
,
// Table.configure({
Table
.
configure
({
// resizable: true,
resizable
:
true
,
// allowTableNodeSelection: true
allowTableNodeSelection
:
true
// }),
}),
// TableRow,
TableRow
,
// TableHeader,
TableHeader
,
TableCell
,
// TableCell.extend({
// TableCell.extend({
// renderHTML({ HTMLAttributes }) {
// renderHTML({ HTMLAttributes }) {
// const attrs = mergeAttributes(this.options.HTMLAttributes, HTMLAttributes);
// const attrs = mergeAttributes(this.options.HTMLAttributes, HTMLAttributes);
...
@@ -489,33 +490,33 @@ const QEditor = ({
...
@@ -489,33 +490,33 @@ const QEditor = ({
// return ['td', attrs, 0];
// return ['td', attrs, 0];
// }
// }
// }),
// }),
//
BubbleMenu,
BubbleMenu
,
//
TextAlign.configure({
TextAlign
.
configure
({
//
defaultAlignment: 'left',
defaultAlignment
:
'
left
'
,
//
types: ['heading', 'paragraph'],
types
:
[
'
heading
'
,
'
paragraph
'
],
//
alignments: ['left', 'center', 'right', 'justify']
alignments
:
[
'
left
'
,
'
center
'
,
'
right
'
,
'
justify
'
]
//
}),
}),
//
TextStyle,
TextStyle
,
//
Color.configure({
Color
.
configure
({
//
types: ['textStyle']
types
:
[
'
textStyle
'
]
//
}),
}),
//
Highlight.configure({
Highlight
.
configure
({
//
multicolor: true
multicolor
:
true
//
}),
}),
// CustomLink.configure({
// CustomLink.configure({
// linkOnPaste: false,
// linkOnPaste: false,
// openOnClick: false
// openOnClick: false
// }),
// }),
//
Focus.configure({
Focus
.
configure
({
//
className: 'atma-editor-focused',
className
:
'
atma-editor-focused
'
,
//
mode: 'all'
mode
:
'
all
'
//
}),
}),
//
DragAndDrop.configure({
DragAndDrop
.
configure
({
//
linkUpload: uploadOptions.url
linkUpload
:
uploadOptions
.
url
//
}),
}),
//
Audio,
Audio
,
//
Superscript,
Superscript
,
//
Subscript,
Subscript
,
],
],
content
:
value
,
content
:
value
,
onUpdate
:
({
editor
})
=>
onChange
(
editor
.
getHTML
()),
onUpdate
:
({
editor
})
=>
onChange
(
editor
.
getHTML
()),
...
@@ -550,6 +551,7 @@ const QEditor = ({
...
@@ -550,6 +551,7 @@ const QEditor = ({
)
)
}
}
const
getUploader
=
({
accept
=
'
*
'
,
...
o
})
=>
{
const
getUploader
=
({
accept
=
'
*
'
,
...
o
})
=>
{
let
url
=
uploadOptions
.
url
let
url
=
uploadOptions
.
url
let
multiple
=
true
let
multiple
=
true
...
...
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