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

apostrophe

Package Overview
Dependencies
Maintainers
8
Versions
1080
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe - npm Package Compare versions

Comparing version 0.4.10 to 0.4.11

views/html.html

2

package.json
{
"name": "apostrophe",
"version": "0.4.10",
"version": "0.4.11",
"description": "Apostrophe is a user-friendly content management system. This core module of Apostrophe provides rich content editing and essential facilities to integrate Apostrophe into your Express project. Apostrophe also includes simple facilities for storing your rich content areas in MongoDB and fetching them back again. Additional functionality is available in modules like apostrophe-pages, apostrophe-snippets, apostrophe-blog, apostrophe-events, apostrophe-twitter and apostrophe-rss.",

@@ -5,0 +5,0 @@ "main": "apostrophe.js",

@@ -1477,2 +1477,57 @@ /* global rangy, $, _ */

apos.widgetTypes.html = {
label: 'Raw HTML',
editor: function(options) {
var self = this;
self.code = '';
if (!options.messages) {
options.messages = {};
}
if (!options.messages.missing) {
options.messages.missing = 'Paste in some HTML code first.';
}
self.afterCreatingEl = function() {
self.$code = self.$el.find('.apos-code');
self.$code.val(self.data.code);
setTimeout(function() {
self.$code.focus();
self.$code.setSelection(0, 0);
}, 500);
// Automatically preview if we detect something that looks like a
// fresh paste
var last = '';
self.timers.push(setInterval(function() {
var next = self.$code.val();
self.exists = (next.length > 2);
if (next !== last) {
self.preview();
}
last = next;
}, 500));
};
self.preSave = getCode;
self.prePreview = getCode;
function getCode(callback) {
var code = self.$code.val();
self.data.code = code;
if (callback) {
callback();
}
}
self.type = 'html';
options.template = '.apos-html-editor';
// Parent class constructor shared by all widget editors
apos.widgetEditor.call(self, options);
}
};
// Utilities

@@ -1479,0 +1534,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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