-
I'm trying to render macro in WYSIWYG editor, but I can't find how core do this: // <<alert primary "primary alert" width:60%>>
{
type: 'macrocall',
start: 0,
params: [
{
type: 'macro-parameter',
start: 7,
value: 'primary',
end: 15,
},
{
type: 'macro-parameter',
start: 15,
value: 'primary alert',
end: 31,
},
{
type: 'macro-parameter',
start: 31,
value: '60%',
name: 'width',
end: 41,
},
],
name: 'alert',
end: 43,
isBlock: true,
} How to render this macro? The only macro related code I found is And it requires And I tried |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @linonetwo the "macrocall" widget can either take its parameters from the parse tree or from the widget attributes. It's generally clearer to use the widget formulation but as you've discovered the parse tree rule generates a non-standard parse tree. |
Beta Was this translation helpful? Give feedback.
Hi @linonetwo the "macrocall" widget can either take its parameters from the parse tree or from the widget attributes. It's generally clearer to use the widget formulation but as you've discovered the parse tree rule generates a non-standard parse tree.