Sha256: 4a7c3529f7617c2dbcbd93e2ceb84ecb2abe1990e88e26a0229ff6747eb97ca6
Contents?: true
Size: 629 Bytes
Versions: 15
Compression:
Stored size: 629 Bytes
Contents
// ForceNL Plugin for PunyMCE // - Converts all <br /> to \n punymce.plugins.ForceNL = function(ed) { // Forces <br /> to \n ed.onGetContent.add(function(ed, o) { if (o.format == 'forcenl' || o.save) { punymce.each([ [/<(br\s*\/)>/gi, "\n"], [/<(br.*?\/)>/gi, ""] //[<br type="_moz"/>, ""] ], function (v) { o.content = o.content.replace(v[0], v[1]); }); } }); ed.onSetContent.add(function(ed, o) { if (o.format == 'forcenl' || o.load) { punymce.each([ [/\n/gi,"<br />"] ], function (v) { o.content = o.content.replace(v[0], v[1]); }); } }); };
Version data entries
15 entries across 15 versions & 1 rubygems