You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to achieve this by modifying the ParagraphComponent within the Components folder. The modification was a quick and dirty one which will probably be refactored and cleaned up some later. However wanted to provide it here just in case anyone else is looking for this type of solution. In this component, the following code was added.
else if (listItemNode.IsBlockNode())
{
var attributes = listItemNode.GetAttributes();
foreach (var attribute in attributes)
{
if (attribute.Name == "align")
{
if(attribute.Value.ToLower() == "left")
{
container = container.AlignLeft();
}
if (attribute.Value.ToLower() == "center")
{
container = container.AlignCenter();
}
if (attribute.Value.ToLower() == "right")
{
container = container.AlignRight();
}
}
}
This is after the if statement checking whether it is a numbered list within the Compose method. Around line 45.
Would it be possible to add a feature of alignment of blocks such as
<p align="center">
or similar for other blocks and alignment? (Left, Right, Top, Middle, etc.) / (h1, h2, etc.)?
Also font attributes such as color, size, etc. ?
Thank you for all your work.
The text was updated successfully, but these errors were encountered: