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
d0e0bf64
Commit
d0e0bf64
authored
Aug 30, 2019
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
img in progress
parent
cdade45f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
wax-prosemirror-schema/src/EditoriaSchema.js
wax-prosemirror-schema/src/EditoriaSchema.js
+8
-2
No files found.
wax-prosemirror-schema/src/EditoriaSchema.js
View file @
d0e0bf64
...
...
@@ -47,7 +47,6 @@ const parseTracks = str => {
};
const
blockLevelToDOM
=
node
=>
{
console
.
log
(
node
);
const
attrs
=
node
.
attrs
.
track
.
length
?
{
class
:
node
.
attrs
.
class
,
...
...
@@ -81,7 +80,8 @@ const EditoriaSchema = {
attrs
:
{
src
:
{},
alt
:
{
default
:
null
},
title
:
{
default
:
null
}
title
:
{
default
:
null
},
track
:
{
default
:
[]
}
},
group
:
"
inline
"
,
draggable
:
true
,
...
...
@@ -92,12 +92,18 @@ const EditoriaSchema = {
return
{
src
:
dom
.
getAttribute
(
"
src
"
),
title
:
dom
.
getAttribute
(
"
title
"
),
track
:
parseTracks
(
dom
.
dataset
.
track
),
alt
:
dom
.
getAttribute
(
"
alt
"
)
};
}
}
],
toDOM
(
node
)
{
const
attrs
=
{};
let
temp
=
""
;
if
(
node
.
attrs
.
track
.
length
)
{
attrs
[
"
data-track
"
]
=
JSON
.
stringify
(
node
.
attrs
.
track
);
}
let
{
src
,
alt
,
title
}
=
node
.
attrs
;
return
[
"
img
"
,
{
src
,
alt
,
title
}];
}
...
...
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