Block nodes could contain other block nodes or inline nodes inside them. Block Nodes (analogous to HTML concept of Block-level elements) that are each rendered on a new line and occupy the available width.There are largely two types of nodes that represent how they should be rendered. Image nodes contain an image src property, Code-blocks may contain a language property and so on). Nodes also hold any properties specific to the object they represent that are needed to render those nodes inside the editor. Paragraph nodes contain text nodes inside them). Some of these may contain other nodes as children inside them (e.g. The common types of nodes that a rich-text document could contain are paragraphs, headings, images, videos, code-blocks and pull-quotes. Document Nodesĭocument nodes are used to represent the contents of the document. Understanding The Document Structureīefore we dive into building the editor, let’s look at how a document is structured for a Rich Text Editor and what are the different types of data structures involved. With this article, we try to not only lay the foundation of building an editor but also give the readers a glimpse into how little nuggets of functionalities when brought together can create a great user experience for a content creator. Taking advantage of the massive outreach of social media platforms, there is a new wave of independent content creators using platforms like Medium to create content and share it with their audience.Īs so many people from different professions and backgrounds try to create content on these products, it’s important that these products provide a performant and seamless experience of content creation and have teams of designers and engineers who develop some level of domain expertise over time in this space. The widespread success of products like Quip, Google Docs and Dropbox Paper has shown how companies are racing to build the best experience for content creators in the enterprise domain and trying to find innovative ways of breaking the traditional moulds of how content is shared and consumed. In recent years, the field of Content Creation and Representation on Digital platforms has seen a massive disruption. The code for the application is available on GitHub for reference. We will use SlateJS to build the shell of the editor and then add a toolbar and custom configurations. In this article, we will learn how to build a WYSIWYG/Rich-Text Editor that supports rich text, images, links and some nuanced features from word processing apps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |