mirror of
https://github.com/codex-team/editor.js
synced 2026-03-17 08:05:47 +01:00
changed parsing method. Now data parses data like sample.json (#84)
* changed parsing method. Now data parses data like sample.json * saver module (#86)
This commit is contained in:
parent
f5c8dc82e3
commit
b0d3907793
8 changed files with 236 additions and 92 deletions
|
|
@ -41,13 +41,16 @@ var codeTool = {
|
|||
*/
|
||||
save : function (block){
|
||||
|
||||
var data = {
|
||||
text : null
|
||||
var json = {
|
||||
type : 'code',
|
||||
data : {
|
||||
text : null,
|
||||
}
|
||||
};
|
||||
|
||||
data.text = blockData.textContent;
|
||||
json.data.text = block.innerHTML;
|
||||
|
||||
return data;
|
||||
return json;
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -67,4 +70,4 @@ cEditor.tools.code = {
|
|||
render : codeTool.render,
|
||||
save : codeTool.save
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue