mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 15:45:47 +01:00
plugins saver method updated (#87)
* changed parsing method. Now data parses data like sample.json * saver module * upgraded plugins
This commit is contained in:
parent
b0d3907793
commit
f3d70c8724
6 changed files with 64 additions and 58 deletions
|
|
@ -39,14 +39,15 @@ var codeTool = {
|
|||
/**
|
||||
* Method to extract JSON data from HTML block
|
||||
*/
|
||||
save : function (block){
|
||||
save : function (blockContent){
|
||||
|
||||
var json = {
|
||||
type : 'code',
|
||||
data : {
|
||||
text : null,
|
||||
}
|
||||
};
|
||||
var block = blockContent[0];
|
||||
json = {
|
||||
type : 'code',
|
||||
data : {
|
||||
text : null,
|
||||
}
|
||||
};
|
||||
|
||||
json.data.text = block.innerHTML;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue