align.js 424 B

123456789101112
  1. import Parchment from 'parchment';
  2. let config = {
  3. scope: Parchment.Scope.BLOCK,
  4. whitelist: ['right', 'center', 'justify']
  5. };
  6. let AlignAttribute = new Parchment.Attributor.Attribute('align', 'align', config);
  7. let AlignClass = new Parchment.Attributor.Class('align', 'ql-align', config);
  8. let AlignStyle = new Parchment.Attributor.Style('align', 'text-align', config);
  9. export { AlignAttribute, AlignClass, AlignStyle };