list fixes: headers, invalid elements, easier ending
[fnpeditor.git] / src / editor / plugins / core / core.js
index bc41e00..c56c5db 100644 (file)
@@ -317,6 +317,13 @@ plugin.documentExtension.documentNode.transformations = {
             }
         });
         return toret;
+    },
+    insertNewNode: function () {
+        var node = this;
+        var newElement = this.document.createDocumentNode({tagName: 'div', attrs: {class: 'p'}});
+        node.after(newElement);
+        newElement.append({text: ''});
+        return newElement;
     }
 };
 
@@ -535,7 +542,7 @@ var createLinkFromSelection = function(callback, params) {
                 prePasteHandler: function(text) {
                                     return params.fragment.document.getLinkForUrl(text);
                                 }.bind(this),
-                description: '<a href="#-" class="attachment-library">attachment library</a>'
+                description: '<a href="#-" class="attachment-library">' + gettext('attachment library') + '</a>'
                 }
             ]
         }),