mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 22:27:10 -04:00
Add h1 adn h2, h2 seems not to work jet, menu immage have to be drawn
This commit is contained in:
parent
d9686c7646
commit
2726634200
5 changed files with 27 additions and 3 deletions
|
@ -472,6 +472,14 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
||||||
{
|
{
|
||||||
cc.doAttrib(state, "strikethrough");
|
cc.doAttrib(state, "strikethrough");
|
||||||
}
|
}
|
||||||
|
if (tname == "h1" )
|
||||||
|
{
|
||||||
|
cc.doAttrib(state, "heading1");
|
||||||
|
}
|
||||||
|
if (tname == "h2")
|
||||||
|
{
|
||||||
|
cc.doAttrib(state, "heading2");
|
||||||
|
}
|
||||||
if (tname == "ul")
|
if (tname == "ul")
|
||||||
{
|
{
|
||||||
var type;
|
var type;
|
||||||
|
|
|
@ -27,7 +27,9 @@ linestylefilter.ATTRIB_CLASSES = {
|
||||||
'bold': 'tag:b',
|
'bold': 'tag:b',
|
||||||
'italic': 'tag:i',
|
'italic': 'tag:i',
|
||||||
'underline': 'tag:u',
|
'underline': 'tag:u',
|
||||||
'strikethrough': 'tag:s'
|
'strikethrough': 'tag:s',
|
||||||
|
'heading1': 'tag:h1',
|
||||||
|
'heading2': 'tag:h2'
|
||||||
};
|
};
|
||||||
|
|
||||||
linestylefilter.getAuthorClassName = function(author)
|
linestylefilter.getAuthorClassName = function(author)
|
||||||
|
|
|
@ -25,7 +25,9 @@ linestylefilter.ATTRIB_CLASSES = {
|
||||||
'bold': 'tag:b',
|
'bold': 'tag:b',
|
||||||
'italic': 'tag:i',
|
'italic': 'tag:i',
|
||||||
'underline': 'tag:u',
|
'underline': 'tag:u',
|
||||||
'strikethrough': 'tag:s'
|
'strikethrough': 'tag:s',
|
||||||
|
'heading1': 'tag:h1',
|
||||||
|
'heading2': 'tag:h2'
|
||||||
};
|
};
|
||||||
|
|
||||||
linestylefilter.getAuthorClassName = function(author)
|
linestylefilter.getAuthorClassName = function(author)
|
||||||
|
|
|
@ -118,6 +118,7 @@ var padeditbar = (function()
|
||||||
padeditor.ace.callWithAce(function(ace)
|
padeditor.ace.callWithAce(function(ace)
|
||||||
{
|
{
|
||||||
if (cmd == 'bold' || cmd == 'italic' || cmd == 'underline' || cmd == 'strikethrough') ace.ace_toggleAttributeOnSelection(cmd);
|
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 == 'undo' || cmd == 'redo') ace.ace_doUndoRedo(cmd);
|
||||||
else if (cmd == 'insertunorderedlist') ace.ace_doInsertUnorderedList();
|
else if (cmd == 'insertunorderedlist') ace.ace_doInsertUnorderedList();
|
||||||
else if (cmd == 'indent')
|
else if (cmd == 'indent')
|
||||||
|
|
|
@ -77,6 +77,17 @@
|
||||||
<div class="buttonicon" style="background-position:0px -86px"></div>
|
<div class="buttonicon" style="background-position:0px -86px"></div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="separator"></li>
|
||||||
|
<li onClick="window.pad&&pad.editbarClick('heading1');return false;" >
|
||||||
|
<a title="Haedline Level 1">
|
||||||
|
<div class="buttonicon" style="background-position:0px -166px"></div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li onClick="window.pad&&pad.editbarClick('heading2');return false;" >
|
||||||
|
<a title="Haedline Level 2">
|
||||||
|
<div class="buttonicon" style="background-position:0px -166px"></div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul id="menu_right">
|
<ul id="menu_right">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue