Fixed inserting of text modules.

This commit is contained in:
Martin Edenhofer 2015-01-07 01:25:27 +01:00
parent 9861978d92
commit 12d1da4b65

View file

@ -243,6 +243,7 @@
// paste some content // paste some content
Plugin.prototype.paste = function(string) { Plugin.prototype.paste = function(string) {
string = App.Utils.text2html(string) + '<br>'
if (document.selection) { // IE if (document.selection) { // IE
var range = document.selection.createRange() var range = document.selection.createRange()
range.pasteHTML(string) range.pasteHTML(string)
@ -280,7 +281,7 @@
for (var i = 0; i < this.collection.length; i++) { for (var i = 0; i < this.collection.length; i++) {
var item = this.collection[i] var item = this.collection[i]
if ( item.id == id ) { if ( item.id == id ) {
var content = item.content + "<br/>\n" var content = item.content
this.cutInput() this.cutInput()
this.paste(content) this.paste(content)
this.close() this.close()