Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ep_headings

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_headings - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

locales/de.json

3

ep.json

@@ -17,3 +17,4 @@ {

"collectContentPre": "ep_headings/static/js/shared",
"collectContentPost": "ep_headings/static/js/shared"
"collectContentPost": "ep_headings/static/js/shared",
"getLineHTMLForExport": "ep_headings/index"
}

@@ -20,0 +21,0 @@ }

@@ -1,7 +0,53 @@

var eejs = require('ep_etherpad-lite/node/eejs/');
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
exports.eejsBlock_editbarMenuLeft = function (hook_name, args, cb) {
args.content = args.content + eejs.require("ep_headings/templates/editbarButtons.ejs");
return cb();
}
}
function getInlineStyle(header) {
switch (header) {
case "h1":
return "font-size: 2.0em;line-height: 120%;";
break;
case "h2":
return "font-size: 1.5em;line-height: 120%;";
break;
case "h3":
return "font-size: 1.17em;line-height: 120%;";
break;
case "h4":
return "line-height: 120%;";
break;
case "h5":
return "font-size: 0.83em;line-height: 120%;";
break;
case "h6":
return "font-size: 0.75em;line-height: 120%;";
break;
case "code":
return "font-family: monospace";
}
return "";
}
// line, apool,attribLine,text
exports.getLineHTMLForExport = function (hook, context) {
var header = _analyzeLine(context.attribLine, context.apool);
if (header) {
var inlineStyle = getInlineStyle(header);
return "<" + header + " style=\"" + inlineStyle + "\">" + context.text.substring(1) + "</" + header + ">";
}
}
function _analyzeLine(alineAttrs, apool) {
var header = null;
if (alineAttrs) {
var opIter = Changeset.opIterator(alineAttrs);
if (opIter.hasNext()) {
var op = opIter.next();
header = Changeset.opAttributeValue(op, 'heading', apool);
}
}
return header;
}
{
"description": "Adds heading support to Etherpad Lite.",
"name": "ep_headings",
"version": "0.1.5",
"version": "0.1.6",
"author": "fourplusone <info@fourplusone.de>",
"contributors": [
{
"name": "Matthias Bartelmeß",
"email": "mba@fourplusone.de"
}
{
"name": "Matthias Bartelmeß",
"email": "mba@fourplusone.de"
},
{
"name": "John McLear",
"email": "john@mclear.co.uk"
},
{
"name": "Gedion Woldeselassie (https://github.com/gedion)",
"email": "gwy321@gmail.com"
}
],

@@ -12,0 +20,0 @@ "dependencies": {},

@@ -9,3 +9,3 @@ var _, $, jQuery;

// All our tags are block elements, so we just return them.
var tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
var tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'code'];
var aceRegisterBlockElements = function(){

@@ -12,0 +12,0 @@ return tags;

var _ = require('ep_etherpad-lite/static/js/underscore');
var tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
var tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'code'];

@@ -5,0 +5,0 @@ var collectContentPre = function(hook, context){

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc