Commit f8e19ca9 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug with inserting a document content into a table.

parent 0cb44c05
...@@ -1303,9 +1303,9 @@ ...@@ -1303,9 +1303,9 @@
this.Document.Selection_Remove(true); this.Document.Selection_Remove(true);
} }
var oParagraph = this.Document.Content[this.Document.CurPos.ContentPos]; var oParagraph = this.Document.Get_CurrentParagraph();
if (!oParagraph || !(oParagraph instanceof Paragraph)) if (!oParagraph)
return false; return;
var oNearestPos = { var oNearestPos = {
Paragraph : oParagraph, Paragraph : oParagraph,
...@@ -1317,9 +1317,9 @@ ...@@ -1317,9 +1317,9 @@
if (!this.Document.Can_InsertContent(oSelectedContent, oNearestPos)) if (!this.Document.Can_InsertContent(oSelectedContent, oNearestPos))
return false; return false;
this.Document.Insert_Content(oSelectedContent, oNearestPos); oParagraph.Parent.Insert_Content(oSelectedContent, oNearestPos);
this.Document.Selection_Remove(true);
oParagraph.Clear_NearestPosArray(); oParagraph.Clear_NearestPosArray();
this.Document.Selection_Remove(true);
return true; return true;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment