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

ep_clear_formatting

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_clear_formatting - npm Package Compare versions

Comparing version 0.0.8 to 0.0.10

.github/workflows/npmpublish.yml

11

clear_formatting.js

@@ -1,9 +0,8 @@

var eejs = require('ep_etherpad-lite/node/eejs/');
var settings = require('ep_etherpad-lite/node/utils/Settings');
var checked_state = '';
const eejs = require('ep_etherpad-lite/node/eejs/');
const settings = require('ep_etherpad-lite/node/utils/Settings');
const checked_state = '';
exports.eejsBlock_dd_format = function (hook_name, args, cb) {
args.content = args.content + eejs.require('ep_clear_formatting/templates/clear_formatting_menu.ejs');
args.content += eejs.require('ep_clear_formatting/templates/clear_formatting_menu.ejs');
return cb();
}
};
{
"name": "ep_clear_formatting",
"version": "0.0.8",
"version": "0.0.10",
"keywords": [

@@ -27,3 +27,19 @@ "clear",

"url": "http://etherpad.org/"
},
"devDependencies": {
"eslint": "^7.14.0",
"eslint-config-etherpad": "^1.0.8",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prefer-arrow": "^1.2.2",
"eslint-plugin-promise": "^4.2.1"
},
"eslintConfig": {
"root": true,
"extends": "etherpad/plugin"
},
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix ."
}
}

@@ -1,18 +0,17 @@

exports.postAceInit = function(hook, context){
$('#clearFormatting').click(function(){
context.ace.callWithAce(function(ace){
exports.postAceInit = function (hook, context) {
$('#clearFormatting').click(() => {
context.ace.callWithAce((ace) => {
const rep = ace.ace_getRep(); // get the current user selection
const isSelection = (rep.selStart[0] !== rep.selEnd[0] || rep.selStart[1] !== rep.selEnd[1]);
if (!isSelection) return false; // No point proceeding if no selection..
var rep = ace.ace_getRep(); // get the current user selection
var isSelection = (rep.selStart[0] !== rep.selEnd[0] || rep.selStart[1] !== rep.selEnd[1]);
if(!isSelection) return false; // No point proceeding if no selection..
var attrs = rep.apool.attribToNum; // get the attributes on this document
$.each(attrs, function(k, v){ // for each attribute
var attr = k.split(",")[0]; // get the name of the attribute
if(attr !== "author"){ // if its not an author attribute
const attrs = rep.apool.attribToNum; // get the attributes on this document
$.each(attrs, (k, v) => { // for each attribute
const attr = k.split(',')[0]; // get the name of the attribute
if (attr !== 'author') { // if its not an author attribute
ace.ace_setAttributeOnSelection(attr, false); // set the attribute to false
}
});
},'clearFormatting' , true);
}, 'clearFormatting', true);
});
}
};

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