Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wax-prosemirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
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
wax
wax-prosemirror
Commits
88eeae00
Commit
88eeae00
authored
Jul 19, 2019
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
2e1559e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
wax-prosemirror-core/src/Wax.js
wax-prosemirror-core/src/Wax.js
+0
-1
wax-prosemirror-core/src/WaxView.js
wax-prosemirror-core/src/WaxView.js
+5
-6
No files found.
wax-prosemirror-core/src/Wax.js
View file @
88eeae00
...
...
@@ -101,7 +101,6 @@ class Wax extends Component {
options
=
{
this
.
WaxOptions
}
placeholder
=
{
placeholder
}
fileUpload
=
{
fileUpload
}
// renderLayout={WaxRender}
theme
=
{
theme
}
onBlur
=
{
onBlur
||
(
value
=>
true
)}
onChange
=
{
this
.
onChange
||
(
value
=>
true
)}
...
...
wax-prosemirror-core/src/WaxView.js
View file @
88eeae00
...
...
@@ -11,9 +11,9 @@ import "prosemirror-gapcursor/style/gapcursor.css";
class
WaxView
extends
Component
{
constructor
(
props
)
{
super
(
props
);
const
{
readonly
,
onBlur
}
=
this
.
props
;
const
{
readonly
,
onBlur
}
=
this
.
props
;
this
.
editorRef
=
React
.
createRef
()
this
.
editorRef
=
React
.
createRef
()
;
// Create view of Editor
this
.
view
=
new
EditorView
(
null
,
{
...
...
@@ -33,7 +33,7 @@ class WaxView extends Component {
componentDidMount
()
{
const
{
autoFocus
,
debug
}
=
this
.
props
;
this
.
editorRef
.
current
.
appendChild
(
this
.
view
.
dom
)
this
.
editorRef
.
current
.
appendChild
(
this
.
view
.
dom
)
;
if
(
debug
)
applyDevTools
(
this
.
view
);
if
(
autoFocus
)
this
.
view
.
focus
();
...
...
@@ -54,7 +54,7 @@ class WaxView extends Component {
tr
.
setMeta
(
placeholderPlugin
,
{
add
:
{
id
,
pos
:
tr
.
selection
.
from
}
});
this
.
view
.
dispatch
(
tr
);
fileUpload
(
file
).
then
(
...
...
@@ -88,7 +88,6 @@ class WaxView extends Component {
findPlaceholder
=
(
state
,
id
)
=>
{
const
decos
=
placeholderPlugin
.
getState
(
state
);
debugger
;
const
found
=
decos
.
find
(
null
,
null
,
spec
=>
spec
.
id
===
id
);
return
found
.
length
?
found
[
0
].
from
:
null
;
};
...
...
@@ -97,7 +96,7 @@ class WaxView extends Component {
const
state
=
this
.
view
.
state
.
apply
(
transaction
);
this
.
view
.
updateState
(
state
);
this
.
props
.
onChange
(
state
.
doc
.
content
);
this
.
forceUpdate
()
this
.
forceUpdate
()
;
};
render
()
{
...
...
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