Comments (1)
Начало заложено в #52
/**
* Methods for parsing JSON reactor data to HTML blocks
*/
cEditor.renderer = {
/**
* Asyncronously parses input JSON to redactor blocks
*/
makeBlocksFromData : function (argument) {
console.info('renderer makeBlocksFromData');
Promise.resolve()
/** First, get JSON from state */
.then(function() {
return cEditor.state.blocks;
})
/** Then, start to iterate they */
.then(cEditor.renderer.appendBlocks)
/** Write log if something goes wrong */
.catch(function(error) {
cEditor.core.log('Error while parsing JSON: %o', 'warn', error);
});
},
/**
* Parses JSON to blocks
* @param {object} data
* @return Primise -> nodeList
*/
appendBlocks : function (data) {
console.info('renderer appendBlocks %o', data);
/**
* Тут надо создать очередь по аналогии с parser.appendNodesToRedactor,
* которая будет асинхронно парсить блоки с помощью метода render у каждого плагина
*/
},
}
/**
* Methods for saving HTML blocks to JSON object
*/
cEditor.saver = {
/**
* Saves blocks
*/
saveBlocks : function (argument) {
console.info('saver saveBlocks');
}
}
from editor.js.
Related Issues (20)
- Block specific Text direction
- this.Editor.BlockManager.clear() should be awaited in renderFromHTML() HOT 2
- Issue: toolbars causing unwanted vertical scrolls HOT 2
- Bug: clicking outside of an editor should clear currentBlock (call dropPointer) even if selection was inside of editor before the click HOT 2
- The font bolding function of inline tools is invalid
- Latest version (v2.29.1) not published under `latest` tag on npm registry HOT 1
- how to support vue3? HOT 1
- Version 2.25.0 has a bug in the Inline Tool (Only occurs on IOS and MacOS). HOT 3
- Version 2.29+ is not compatible with editorjs-hyperlink
- When setting a block to stretched the toolbar is not stretched as well
- How can I type a question mark into a block? HOT 1
- Implementing Inline Tool Opening on Text Hover in Editor.js HOT 1
- support markdown input? HOT 1
- Chrome error when EditorJs is loaded in an iframe HOT 2
- The best text editor! Good job! But there is a small problem. enableLineBreaks does not remove lines
- CSS `inline-block` in Firefox causes empty hyperlinks
- I18n configuration doesn't seem to work for block tunes
- Scrolls to the top of the page when focused on some select element
- Tunes with wrappers aren't calling didMutated, when changing tune value
- URL is not being treated as a url HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editor.js.