mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 11:22:41 +01:00
probably really bad but core support in for images defo needs strong review
This commit is contained in:
parent
58cd71dcce
commit
63ab85aeb2
1 changed files with 14 additions and 8 deletions
|
@ -166,7 +166,9 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
||||||
function _isEmpty(node, state)
|
function _isEmpty(node, state)
|
||||||
{
|
{
|
||||||
// consider clean blank lines pasted in IE to be empty
|
// consider clean blank lines pasted in IE to be empty
|
||||||
if (dom.nodeNumChildren(node) == 0) return true;
|
if (dom.nodeNumChildren(node) == 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (dom.nodeNumChildren(node) == 1 && getAssoc(node, "shouldBeEmpty") && dom.optNodeInnerHTML(node) == " " && !getAssoc(node, "unpasted"))
|
if (dom.nodeNumChildren(node) == 1 && getAssoc(node, "shouldBeEmpty") && dom.optNodeInnerHTML(node) == " " && !getAssoc(node, "unpasted"))
|
||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
|
@ -452,7 +454,11 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var tname = (dom.nodeTagName(node) || "").toLowerCase();
|
var tname = (dom.nodeTagName(node) || "").toLowerCase();
|
||||||
if (tname == "br")
|
if (tname == "img")
|
||||||
|
{
|
||||||
|
state.lineAttributes.image = node.outerHTML;
|
||||||
|
}
|
||||||
|
else if (tname == "br")
|
||||||
{
|
{
|
||||||
this.breakLine = true;
|
this.breakLine = true;
|
||||||
var tvalue = dom.nodeAttr(node, 'value');
|
var tvalue = dom.nodeAttr(node, 'value');
|
||||||
|
@ -616,13 +622,13 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
||||||
};
|
};
|
||||||
// each returns [line, char] or [-1,-1]
|
// each returns [line, char] or [-1,-1]
|
||||||
var getSelectionStart = function()
|
var getSelectionStart = function()
|
||||||
{
|
{
|
||||||
return selStart;
|
return selStart;
|
||||||
};
|
};
|
||||||
var getSelectionEnd = function()
|
var getSelectionEnd = function()
|
||||||
{
|
{
|
||||||
return selEnd;
|
return selEnd;
|
||||||
};
|
};
|
||||||
|
|
||||||
// returns array of strings for lines found, last entry will be "" if
|
// returns array of strings for lines found, last entry will be "" if
|
||||||
// last line is complete (i.e. if a following span should be on a new line).
|
// last line is complete (i.e. if a following span should be on a new line).
|
||||||
|
|
Loading…
Reference in a new issue