Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #563 from substance/jats-converter
Adaptations evolved working on JATS converter
- Loading branch information
Showing
18 changed files
with
231 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
var InlineNode = require('./InlineNode'); | ||
|
||
function InlineWrapper() { | ||
InlineWrapper.super.apply(this, arguments); | ||
} | ||
|
||
InlineNode.extend(InlineWrapper); | ||
|
||
InlineWrapper.static.name = 'inline-wrapper'; | ||
|
||
InlineWrapper.static.defineSchema({ | ||
wrappedNode: 'id' | ||
}); | ||
|
||
module.exports = InlineWrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
type: 'inline-wrapper', | ||
import: function(el, node, converter) { | ||
// HACK monkey patching the context | ||
node.id = converter.nextId('inline-wrapper'); | ||
var state = converter.state; | ||
state.popElementContext(); | ||
state.pushElementContext(state.getCurrentElementContext().tagName); | ||
node.wrappedNode = converter.convertElement(el).id; | ||
}, | ||
export: function(node, el, converter) { | ||
return converter.convertNode(node.wrappedNode); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
.sc-text-property { | ||
|
||
white-space: pre-wrap; | ||
|
||
.se-cursor { | ||
position: relative; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.