Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wax-prosemirror
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wax
wax-prosemirror
Commits
1b2da1a3
Commit
1b2da1a3
authored
2 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
revert change
parent
06246f7a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wax-prosemirror-services/src/TextBlockLevel/BlockQuoteService/BlockQuote.js
+2
-12
2 additions, 12 deletions
...rvices/src/TextBlockLevel/BlockQuoteService/BlockQuote.js
with
2 additions
and
12 deletions
wax-prosemirror-services/src/TextBlockLevel/BlockQuoteService/BlockQuote.js
+
2
−
12
View file @
1b2da1a3
...
@@ -2,10 +2,9 @@ import React from 'react';
...
@@ -2,10 +2,9 @@ import React from 'react';
import
{
injectable
}
from
'
inversify
'
;
import
{
injectable
}
from
'
inversify
'
;
import
{
isEmpty
}
from
'
lodash
'
;
import
{
isEmpty
}
from
'
lodash
'
;
import
{
wrapIn
}
from
'
prosemirror-commands
'
;
import
{
wrapIn
}
from
'
prosemirror-commands
'
;
import
{
NodeSelection
,
TextSelection
}
from
'
prosemirror-state
'
;
import
{
NodeSelection
}
from
'
prosemirror-state
'
;
import
{
LeftSideButton
}
from
'
wax-prosemirror-components
'
;
import
{
LeftSideButton
}
from
'
wax-prosemirror-components
'
;
import
{
Tools
}
from
'
wax-prosemirror-core
'
;
import
{
Tools
}
from
'
wax-prosemirror-core
'
;
import
{
findWrapping
}
from
'
prosemirror-transform
'
;
@
injectable
()
@
injectable
()
class
BlockQuote
extends
Tools
{
class
BlockQuote
extends
Tools
{
...
@@ -15,16 +14,7 @@ class BlockQuote extends Tools {
...
@@ -15,16 +14,7 @@ class BlockQuote extends Tools {
get
run
()
{
get
run
()
{
return
(
state
,
dispatch
)
=>
{
return
(
state
,
dispatch
)
=>
{
const
selectionFrom
=
new
TextSelection
(
state
.
doc
.
resolve
(
0
));
wrapIn
(
state
.
config
.
schema
.
nodes
.
blockquote
)(
state
,
dispatch
);
const
selectionTo
=
new
TextSelection
(
state
.
doc
.
resolve
(
state
.
doc
.
content
.
size
),
);
const
range
=
selectionFrom
.
$from
.
blockRange
(
selectionTo
.
$to
);
const
wrapping
=
range
&&
findWrapping
(
range
,
state
.
config
.
schema
.
nodes
.
blockquote
,
{});
dispatch
(
state
.
tr
.
wrap
(
range
,
wrapping
).
scrollIntoView
());
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment