Source

wikdNode / scripts / JoinOnSpace.groovy

The branch 'default' does not exist.
1
2
3
4
5
6
7
8
9
// @CacheScriptContent(true)
// @ExecutionModes({ON_SINGLE_NODE})

def joinText(c, node, mark) {
    node.text = c.selecteds.collect { it.plainText.trim() }.join(mark)
    c.selecteds.tail().each { it.delete() }
}
joinText(c, node, ' ')