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
Merge requests
!143
Track changes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Track changes
track-changes
into
master
Overview
0
Commits
25
Pipelines
0
Changes
52
Merged
Christos
requested to merge
track-changes
into
master
4 years ago
Overview
0
Commits
25
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
172ea43c
Prev
Next
Show latest version
1 file
+
3
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
172ea43c
use pm command for codeblock
· 172ea43c
chris
authored
4 years ago
wax-prosemirror-services/src/CodeBlockService/CodeBlockTool.js
+
3
−
6
Options
import
{
injectable
}
from
'
inversify
'
;
import
{
icons
}
from
'
wax-prosemirror-components
'
;
import
{
Commands
}
from
'
wax-
prosemirror-
utilitie
s
'
;
import
{
setBlockType
}
from
'
prosemirror-
command
s
'
;
import
Tools
from
'
../lib/Tools
'
;
@
injectable
()
@@ -10,16 +10,13 @@ class CodeBlockTool extends Tools {
get
run
()
{
return
(
state
,
dispatch
)
=>
{
Commands
.
setBlockType
(
state
.
config
.
schema
.
nodes
.
code_block
)(
state
,
dispatch
,
);
setBlockType
(
state
.
config
.
schema
.
nodes
.
code_block
)(
state
,
dispatch
);
};
}
get
enable
()
{
return
state
=>
{
return
Commands
.
setBlockType
(
state
.
config
.
schema
.
nodes
.
code_block
)(
state
);
return
setBlockType
(
state
.
config
.
schema
.
nodes
.
code_block
)(
state
);
};
}
}