mirror of
https://github.com/codex-team/editor.js
synced 2024-06-20 22:55:15 +02:00
merged
This commit is contained in:
parent
75ce6ae4f2
commit
48438d456e
10
example.html
10
example.html
|
@ -151,15 +151,9 @@
|
||||||
type: 'instagram',
|
type: 'instagram',
|
||||||
iconClassname: 'ce-icon-instagram',
|
iconClassname: 'ce-icon-instagram',
|
||||||
prepare: instagram.prepare,
|
prepare: instagram.prepare,
|
||||||
make: instagram.make,
|
|
||||||
appendCallback: null,
|
|
||||||
settings: null,
|
|
||||||
render: instagram.reneder,
|
render: instagram.reneder,
|
||||||
validate: instagram.validate,
|
validate: instagram.validate,
|
||||||
save: instagram.save,
|
save: instagram.save
|
||||||
displayInToolbox: false,
|
|
||||||
enableLineBreaks: false,
|
|
||||||
allowedToPaste: false
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
type: 'twitter',
|
type: 'twitter',
|
||||||
|
@ -177,7 +171,7 @@
|
||||||
make: embed.make,
|
make: embed.make,
|
||||||
render: embed.render,
|
render: embed.render,
|
||||||
save: embed.save,
|
save: embed.save,
|
||||||
validate: embed.validate,
|
validate: embed.validate
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data : {
|
data : {
|
||||||
|
|
|
@ -418,6 +418,13 @@ var quote = (function(quote) {
|
||||||
|
|
||||||
var prepareDataForSave_ = function(data) {
|
var prepareDataForSave_ = function(data) {
|
||||||
|
|
||||||
|
if (data.size == 'withPhoto') {
|
||||||
|
data.size = 'small';
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -448,11 +455,7 @@ var quote = (function(quote) {
|
||||||
*/
|
*/
|
||||||
var parsedblock = methods_.parseBlockQuote(blockContent);
|
var parsedblock = methods_.parseBlockQuote(blockContent);
|
||||||
|
|
||||||
if (parsedblock.style == 'withPhoto') {
|
var data = {
|
||||||
parsedblock.style = 'small';
|
|
||||||
}
|
|
||||||
|
|
||||||
data = {
|
|
||||||
"text" : parsedblock.text,
|
"text" : parsedblock.text,
|
||||||
"format" : "html",
|
"format" : "html",
|
||||||
"cite" : parsedblock.author,
|
"cite" : parsedblock.author,
|
||||||
|
@ -461,7 +464,7 @@ var quote = (function(quote) {
|
||||||
"image" : parsedblock.photo
|
"image" : parsedblock.photo
|
||||||
};
|
};
|
||||||
|
|
||||||
return data;
|
return prepareDataForSave_(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue