aboutsummaryrefslogtreecommitdiffstats
path: root/infrastructure
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--infrastructure/ace/www/ace2_inner.js29
1 files changed, 24 insertions, 5 deletions
diff --git a/infrastructure/ace/www/ace2_inner.js b/infrastructure/ace/www/ace2_inner.js
index 645e406..8bd1096 100644
--- a/infrastructure/ace/www/ace2_inner.js
+++ b/infrastructure/ace/www/ace2_inner.js
@@ -2086,15 +2086,34 @@ function OUTER(gscope) {
[[attributeName,'']]);
}
else {
+ var settings = [[attributeName, 'true']];
+
if (attributeName == 'h1' || attributeName == 'h2' || attributeName == 'h3' ||
attributeName == 'h4' || attributeName == 'h5' || attributeName == 'h6') {
- performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd,
- [['h1',''], ['h2',''], ['h3',''],
- ['h4',''], ['h5',''], ['h6','']]);
+
+ settings = [['h1',''], ['h2',''], ['h3',''],
+ ['h4',''], ['h5',''], ['h6','']];
+ if (attributeName == 'h1') {
+ settings[0] = [attributeName, 'true'];
+ }
+ else if (attributeName == 'h2') {
+ settings[1] = [attributeName, 'true'];
+ }
+ else if (attributeName == 'h3') {
+ settings[2] = [attributeName, 'true'];
+ }
+ else if (attributeName == 'h4') {
+ settings[3] = [attributeName, 'true'];
+ }
+ else if (attributeName == 'h5') {
+ settings[4] = [attributeName, 'true'];
+ }
+ else if (attributeName == 'h6') {
+ settings[5] = [attributeName, 'true'];
+ }
}
- performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd,
- [[attributeName,'true']]);
+ performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd, settings);
}
}