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
b6543b9b
Commit
b6543b9b
authored
4 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
blockquote active
parent
d2cae678
No related branches found
No related tags found
1 merge request
!243
Feature improvments
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
editors/editoria/src/Editoria.js
+1
-2
1 addition, 2 deletions
editors/editoria/src/Editoria.js
wax-prosemirror-services/src/TextBlockLevel/BlockQuoteService/BlockQuote.js
+16
-1
16 additions, 1 deletion
...rvices/src/TextBlockLevel/BlockQuoteService/BlockQuote.js
with
17 additions
and
3 deletions
editors/editoria/src/Editoria.js
+
1
−
2
View file @
b6543b9b
...
@@ -62,8 +62,7 @@ const Editoria = () => {
...
@@ -62,8 +62,7 @@ const Editoria = () => {
autoFocus
autoFocus
placeholder
=
"
Type Something...
"
placeholder
=
"
Type Something...
"
fileUpload
=
{
file
=>
renderImage
(
file
)}
fileUpload
=
{
file
=>
renderImage
(
file
)}
value
=
{
`<p class="paragraph">hello</p><p class="custom-tag-label-3" data-type="block">Lorem this is <span class="custom-tag-label-1,custom-tag-label-2" data-type="inline" data-tags="["custom-tag-label-1","custom-tag-label-2"]">text </span>dolor si</p>`
}
value
=
{
demo
}
// value={demo}
// readonly
// readonly
layout
=
{
layout
}
layout
=
{
layout
}
// onChange={source => console.log(source)}
// onChange={source => console.log(source)}
...
...
This diff is collapsed.
Click to expand it.
wax-prosemirror-services/src/TextBlockLevel/BlockQuoteService/BlockQuote.js
+
16
−
1
View file @
b6543b9b
import
Tools
from
'
../../lib/Tools
'
;
import
{
injectable
}
from
'
inversify
'
;
import
{
injectable
}
from
'
inversify
'
;
import
{
wrapIn
}
from
'
prosemirror-commands
'
;
import
{
wrapIn
}
from
'
prosemirror-commands
'
;
import
{
NodeSelection
}
from
'
prosemirror-state
'
;
import
Tools
from
'
../../lib/Tools
'
;
@
injectable
()
@
injectable
()
class
BlockQuote
extends
Tools
{
class
BlockQuote
extends
Tools
{
...
@@ -19,6 +20,20 @@ class BlockQuote extends Tools {
...
@@ -19,6 +20,20 @@ class BlockQuote extends Tools {
return
true
;
return
true
;
};
};
get
active
()
{
return
state
=>
{
const
{
$from
,
to
}
=
state
.
selection
;
const
same
=
$from
.
sharedDepth
(
to
);
if
(
same
===
0
)
return
false
;
const
pos
=
$from
.
before
(
same
);
const
node
=
NodeSelection
.
create
(
state
.
doc
,
pos
);
if
(
node
.
$from
.
parent
.
hasMarkup
(
state
.
config
.
schema
.
nodes
.
blockquote
))
{
return
true
;
}
return
false
;
};
}
get
enable
()
{
get
enable
()
{
return
state
=>
{
return
state
=>
{
return
wrapIn
(
state
.
config
.
schema
.
nodes
.
blockquote
)(
state
);
return
wrapIn
(
state
.
config
.
schema
.
nodes
.
blockquote
)(
state
);
...
...
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