How to use the roosterjs-editor-api.setAlignment function in roosterjs-editor-api

To help you get started, we’ve selected a few roosterjs-editor-api examples, based on popular ways it is used in public projects.

github microsoft / roosterjs / sample / scripts / initFormatBar.ts View on Github external
document.getElementById('alignRightButton').addEventListener('click', function() {
        setAlignment(getCurrentEditor(), Alignment.Right);
    });
github microsoft / roosterjs / sample / scripts / initFormatBar.ts View on Github external
document.getElementById('alignCenterButton').addEventListener('click', function() {
        setAlignment(getCurrentEditor(), Alignment.Center);
    });
github microsoft / roosterjs / sample / scripts / initFormatBar.ts View on Github external
document.getElementById('alignLeftButton').addEventListener('click', function() {
        setAlignment(getCurrentEditor(), Alignment.Left);
    });