diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2010-02-05 01:58:02 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2010-02-05 02:17:51 +0100 |
commit | 1199878005d6980e6f3631f419778927147bd639 (patch) | |
tree | 266c60e73d5cbd4ffc8a36ea7dc005b877ca3273 /infrastructure/ace/www | |
parent | 06ba710dccff087c8546aee7812487693ea7e88c (diff) | |
download | etherpad-1199878005d6980e6f3631f419778927147bd639.tar.gz etherpad-1199878005d6980e6f3631f419778927147bd639.tar.xz etherpad-1199878005d6980e6f3631f419778927147bd639.zip |
added header buttons and used backend functionality
Diffstat (limited to 'infrastructure/ace/www')
-rw-r--r-- | infrastructure/ace/www/ace2_inner.js | 9 | ||||
-rw-r--r-- | infrastructure/ace/www/contentcollector.js | 15 | ||||
-rw-r--r-- | infrastructure/ace/www/linestylefilter.js | 7 |
3 files changed, 29 insertions, 2 deletions
diff --git a/infrastructure/ace/www/ace2_inner.js b/infrastructure/ace/www/ace2_inner.js index 94aba87..6723cef 100644 --- a/infrastructure/ace/www/ace2_inner.js +++ b/infrastructure/ace/www/ace2_inner.js @@ -753,6 +753,11 @@ function OUTER(gscope) { underline: function() { toggleAttributeOnSelection('underline'); }, strikethrough: function() { toggleAttributeOnSelection('strikethrough'); }, h1: function() { toggleAttributeOnSelection('h1'); }, + h2: function() { toggleAttributeOnSelection('h2'); }, + h3: function() { toggleAttributeOnSelection('h3'); }, + h4: function() { toggleAttributeOnSelection('h4'); }, + h5: function() { toggleAttributeOnSelection('h5'); }, + h6: function() { toggleAttributeOnSelection('h6'); }, undo: function() { doUndoRedo('undo'); }, redo: function() { doUndoRedo('redo'); }, clearauthorship: function(prompt) { @@ -1532,7 +1537,9 @@ function OUTER(gscope) { } var STYLE_ATTRIBS = {bold: true, italic: true, underline: true, - strikethrough: true, h1: true, list: true}; + strikethrough: true, h1: true, h2: true, + h3: true, h4: true, h5: true, h6: true, + list: true}; var OTHER_INCORPED_ATTRIBS = {insertorder: true, author: true}; function isStyleAttribute(aname) { diff --git a/infrastructure/ace/www/contentcollector.js b/infrastructure/ace/www/contentcollector.js index 41922d7..573672e 100644 --- a/infrastructure/ace/www/contentcollector.js +++ b/infrastructure/ace/www/contentcollector.js @@ -343,6 +343,21 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, if (tname == "h1") { doAttrib("h1"); } + if (tname == "h2") { + doAttrib("h2"); + } + if (tname == "h3") { + doAttrib("h3"); + } + if (tname == "h4") { + doAttrib("h4"); + } + if (tname == "h5") { + doAttrib("h5"); + } + if (tname == "h6") { + doAttrib("h6"); + } if (tname == "ul") { var type; var rr = cls && /(?:^| )list-(bullet[12345678])\b/.exec(cls); diff --git a/infrastructure/ace/www/linestylefilter.js b/infrastructure/ace/www/linestylefilter.js index 3514859..ef824cc 100644 --- a/infrastructure/ace/www/linestylefilter.js +++ b/infrastructure/ace/www/linestylefilter.js @@ -26,7 +26,12 @@ linestylefilter.ATTRIB_CLASSES = { 'italic':'tag:i', 'underline':'tag:u', 'strikethrough':'tag:s', - 'h1':'tag:h1' + 'h1':'tag:h1', + 'h2':'tag:h2', + 'h3':'tag:h3', + 'h4':'tag:h4', + 'h5':'tag:h5', + 'h6':'tag:h6' }; linestylefilter.getAuthorClassName = function(author) { |