|
@@ -21,6 +21,10 @@ import TableWidthCommand from './commands/tablewidthcommand';
|
|
|
import TableHeightCommand from './commands/tableheightcommand';
|
|
import TableHeightCommand from './commands/tableheightcommand';
|
|
|
import TableAlignmentCommand from './commands/tablealignmentcommand';
|
|
import TableAlignmentCommand from './commands/tablealignmentcommand';
|
|
|
|
|
|
|
|
|
|
+// RegExp used for matching margin style in converters.
|
|
|
|
|
+const MARGIN_REG_EXP = /^(auto|0(%|[a-z]{2,4})?)$/;
|
|
|
|
|
+const ALIGN_VALUES_REG_EXP = /^(left|right|center)$/;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* The table properties editing feature.
|
|
* The table properties editing feature.
|
|
|
*
|
|
*
|
|
@@ -111,8 +115,8 @@ function enableAlignmentProperty( schema, conversion ) {
|
|
|
.attributeToAttribute( {
|
|
.attributeToAttribute( {
|
|
|
view: {
|
|
view: {
|
|
|
styles: {
|
|
styles: {
|
|
|
- 'margin-right': /^(auto|0(%|[a-z]{2,4})?)$/,
|
|
|
|
|
- 'margin-left': /^(auto|0(%|[a-z]{2,4})?)$/
|
|
|
|
|
|
|
+ 'margin-right': MARGIN_REG_EXP,
|
|
|
|
|
+ 'margin-left': MARGIN_REG_EXP
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
model: {
|
|
model: {
|
|
@@ -136,7 +140,7 @@ function enableAlignmentProperty( schema, conversion ) {
|
|
|
.attributeToAttribute( {
|
|
.attributeToAttribute( {
|
|
|
view: {
|
|
view: {
|
|
|
attributes: {
|
|
attributes: {
|
|
|
- align: /^(left|right|center)$/
|
|
|
|
|
|
|
+ align: ALIGN_VALUES_REG_EXP
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
model: {
|
|
model: {
|