concordion-embed-extension

An extension to Concordion that adds an `embed` command to embed HTML in the Concordion output

License

License

GroupId

GroupId

org.concordion
ArtifactId

ArtifactId

concordion-embed-extension
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

concordion-embed-extension
An extension to Concordion that adds an `embed` command to embed HTML in the Concordion output
Project URL

Project URL

https://github.com/concordion/concordion-embed-extension
Source Code Management

Source Code Management

https://github.com/concordion/concordion-embed-extension.git

Download concordion-embed-extension

How to add to project

<!-- https://jarcasting.com/artifacts/org.concordion/concordion-embed-extension/ -->
<dependency>
    <groupId>org.concordion</groupId>
    <artifactId>concordion-embed-extension</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.concordion/concordion-embed-extension/
implementation 'org.concordion:concordion-embed-extension:1.2.0'
// https://jarcasting.com/artifacts/org.concordion/concordion-embed-extension/
implementation ("org.concordion:concordion-embed-extension:1.2.0")
'org.concordion:concordion-embed-extension:jar:1.2.0'
<dependency org="org.concordion" name="concordion-embed-extension" rev="1.2.0">
  <artifact name="concordion-embed-extension" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.concordion', module='concordion-embed-extension', version='1.2.0')
)
libraryDependencies += "org.concordion" % "concordion-embed-extension" % "1.2.0"
[org.concordion/concordion-embed-extension "1.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.concordion : concordion jar 2.2.0

Project Modules

There are no modules declared in this project.

Build Status Maven Central Apache License 2.0

This Concordion extension adds an embed command that embeds HTML in the Concordion output. It is similar to the echo command, except that it does not escape HTML text.

Installation

The extension is available from Maven Central.

Usage

To add the extension with no namespace declarations, either annotate the fixture class with:

    @Extensions(EmbedExtension.class)

or set the system property concordion.extensions to org.concordion.ext.EmbedExtension

HTML

For HTML format specifications, to use the embed command, add an attribute named embed using the namespace "urn:concordion-extensions:2010" to an element. For example:

    <html xmlns:concordion="http://www.concordion.org/2007/concordion"
        xmlns:ext="urn:concordion-extensions:2010">

    ....
    <span ext:embed="methodThatReturnsHtml()"/>
    ...

Markdown

For Markdown format specifications, you need to declare the ext namespace in the Concordion fixture:

@ConcordionOptions(declareNamespaces={"ext", "urn:concordion-extensions:2010"})

The embed command can then be used within the Markdown spec, eg:

[-](- "ext:embed=getDetails()")

Declaring additional namespaces

If the HTML fragment includes elements or attributes with a namespace prefix, the additional namespaces must be declared, both in the HTML specification, and to the extension. The easiest way is to use the @Extension annotation on an EmbedExtension instance field within the fixture class.

For example, to map the myns prefix to the http://com.myco/myns namespace:

        @Extension
        public ConcordionExtension extension =
            new EmbedExtension().withNamespace("myns", "http://com.myco/myns");

Further info

org.concordion

Versions

Version
1.2.0
1.1.2