This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config/schema/rich-text.json b/config/schema/rich-text.json | |
index 945b771d2..385e33e8a 100644 | |
--- a/config/schema/rich-text.json | |
+++ b/config/schema/rich-text.json | |
@@ -88,7 +88,19 @@ | |
"type": "integer" | |
}, | |
"attributes": { | |
- "$ref": "#/attributes" | |
+ "oneOf": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/shared/find_each_model.js b/shared/find_each_model.js | |
index fb575db..bb671c8 100644 | |
--- a/shared/find_each_model.js | |
+++ b/shared/find_each_model.js | |
@@ -1,10 +1,12 @@ | |
var Bluebird = require('bluebird'); | |
-module.exports = function findEach(Model, fn, since, success) { | |
- since = (since == null) ? 0 : since; | |
+module.exports = function findEach(Model, fn, lastId, success) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# at 76104583 | |
#161020 20:30:26 server id 211 end_log_pos 76104666 CRC32 0xccbca688 Query thread_id=878921 exec_time=0 error_code=0 | |
SET TIMESTAMP=1476995426/*!*/; | |
BEGIN | |
/*!*/; | |
# at 76104666 | |
#161020 20:30:26 server id 211 end_log_pos 76121710 CRC32 0x27a99c3e Query thread_id=878921 exec_time=0 error_code=0 | |
SET TIMESTAMP=1476995426/*!*/; | |
update `docs` set `head_version` = '{\"doc_id\":154345,\"user_id\":44,\"delta\":[{\"p\":[\"publish_history\",2],\"li\":{\"date\":\"2016-10-20T20:30:23.628Z\",\"user\":\"David Fucillo\",\"event_type\":\"published\"}}],\"contents\":{\"hed\":{\"ops\":[{\"attributes\":{\"author\":\"44\"},\"insert\":\"Jameis \"},{\"insert\":\"Winston on why he didn’t go to Stanford: “It was really me not really knowing how prestigious Stanford was.”\\n\",\"attributes\":{\"author\":\"1627\"}}]},\"dek\":{\"ops\":[{\"insert\":\"The Tampa Bay Buccaneer\",\"attributes\":{\"author\":\"1627\"}},{\"insert\":\"s\",\"attributes\":{\"author\":\"44\"}},{\"insert\":\" quarterback met with the Bay Area media, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fix(records, params, matcher) | |
params = params.deep_dup | |
records.each do |record| | |
if p.any? { |attrs| attrs['id'].present? && attrs['id'].to_i == record.id } | |
next | |
elsif (new_attrs = p.detect { |attrs| attrs['id'].blank? && attrs[matcher].present? && attrs[matcher].to_i == record[matcher] }) | |
new_attrs['id'] = record.id | |
else | |
p << { '_destroy' => true, 'id' => record.id } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
type: 'embed', | |
tag: 'IFRAME', | |
add: function(node, value) { | |
node.classList.add('image'); | |
node.setAttribute('data-src', value.src); | |
node.setAttribute('data-caption', value.caption); | |
node.setAttribute('src', '/iframe/image.html'); | |
return node; | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
type: 'embed', | |
tag: 'IFRAME', | |
add: function(node, data) { | |
node.classList.add('pullquote'); | |
node.setAttribute('data-pullquote', data.value); | |
node.setAttribute('src', '/iframe/pullquote.html'); | |
return node; | |
}, | |
remove: function(node) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$schema: 'http://json-schema.org/draft-04/schema#' | |
type: object | |
properties: | |
ops: | |
type: array | |
items: | |
oneOf: | |
- type: object | |
properties: | |
insert: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"startLength": 0, | |
"endLength": 394, | |
"ops": [ | |
{ | |
"value": "Quill Rich Text Editor", | |
"attributes": { | |
"size": "18px" | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:(function($) {var ad = $('<p>').css({ backgroundColor: 'red', height: '0' }); $('#article-body, .entry-body').first().find('p, h1, h2, h3, h4, h5, h6, blockquote').eq(2).before(ad); ad.animate({ height: '250px' }, 'fast'); })(jQuery)">Test mid-body ad</a> | |
<p>^---- Drag this to your bookmarks toolbar.</p> | |
<p>Click it on any chorus article page to insert a red box where the ad would appear.</p> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="width: 970px; margin: 0 auto; clear: both;"> | |
<!-- ad markup goes here --> | |
</div> |