diff --git a/node/utils/contentcollector.js b/node/utils/contentcollector.js index 60bd0a6ef..bb9ece834 100644 --- a/node/utils/contentcollector.js +++ b/node/utils/contentcollector.js @@ -472,6 +472,14 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class { cc.doAttrib(state, "strikethrough"); } + if (tname == "h1" ) + { + cc.doAttrib(state, "heading1"); + } + if (tname == "h2") + { + cc.doAttrib(state, "heading2"); + } if (tname == "ul") { var type; diff --git a/static/js/linestylefilter.js b/static/js/linestylefilter.js index f6cf9f357..ee9c63914 100644 --- a/static/js/linestylefilter.js +++ b/static/js/linestylefilter.js @@ -27,7 +27,9 @@ linestylefilter.ATTRIB_CLASSES = { 'bold': 'tag:b', 'italic': 'tag:i', 'underline': 'tag:u', - 'strikethrough': 'tag:s' + 'strikethrough': 'tag:s', + 'heading1': 'tag:h1', + 'heading2': 'tag:h2' }; linestylefilter.getAuthorClassName = function(author) diff --git a/static/js/linestylefilter_client.js b/static/js/linestylefilter_client.js index b1bdae6ef..c9a143081 100644 --- a/static/js/linestylefilter_client.js +++ b/static/js/linestylefilter_client.js @@ -25,7 +25,9 @@ linestylefilter.ATTRIB_CLASSES = { 'bold': 'tag:b', 'italic': 'tag:i', 'underline': 'tag:u', - 'strikethrough': 'tag:s' + 'strikethrough': 'tag:s', + 'heading1': 'tag:h1', + 'heading2': 'tag:h2' }; linestylefilter.getAuthorClassName = function(author) diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js index 97bd7f85b..524be0e68 100644 --- a/static/js/pad_editbar.js +++ b/static/js/pad_editbar.js @@ -118,6 +118,7 @@ var padeditbar = (function() padeditor.ace.callWithAce(function(ace) { if (cmd == 'bold' || cmd == 'italic' || cmd == 'underline' || cmd == 'strikethrough') ace.ace_toggleAttributeOnSelection(cmd); + else if (cmd == 'heading1' || cmd == 'heading2') ace.ace_toggleAttributeOnSelection(cmd); else if (cmd == 'undo' || cmd == 'redo') ace.ace_doUndoRedo(cmd); else if (cmd == 'insertunorderedlist') ace.ace_doInsertUnorderedList(); else if (cmd == 'indent') diff --git a/static/pad.html b/static/pad.html index 35ec559bc..58d83df70 100644 --- a/static/pad.html +++ b/static/pad.html @@ -77,6 +77,17 @@
+
  • +
  • + +
    +
    +
  • +
  • + +
    +
    +