-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Describe the bug
Size attribute is not being recognized as default
The delta code which generates the Problem
Example:
{
"attributes": {
"color": "#e74c3c",
"size": "21pt",
"font": "Lancelot, cursive"
},
"insert": "Lorem ipsum!"
}
I create this new listener
class Size extends InlineListener
{
/**
* {@inheritDoc}
*/
public function process(Line $line)
{
$size = $line->getAttribute('size');
if ($size) {
$this->updateInput($line, $this->applyTemplate($size, $line));
}
}
public function applyTemplate($size, Line $line)
{
return '<span style="font-size: '.$line->getLexer()->escape($size).';">'. $line->getInput() . '</span>';
}
}
Is possible to add by default in your lib?
LifeIsHex
Metadata
Metadata
Assignees
Labels
No labels