10. convert

Parameter syntax:

[ implicit_selection ]? [ S '#text' | element_name ]?

Converts text selection or selected nodes to argument node[4].

Unlike replace which creates an empty new element, convert transfers the content of the selection to the new element which is the result of the conversion.

More precisely, in the case of node selection:

Examples:

convert emphasis
convert [implicitElement] #text

See also command wrap, a variant of command convert which has a different behavior in the case of single element selection.



[4] Note that, unlike commands insert, replace, add, a #template() argument is not supported by command convert.