AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Byword medium draft11/19/2022 #Byword medium draft code#You can take a look at the demo editor's code to see the implementation. Its API is almost the same as that of draft-js. Medium-draft sits on top of draft-js with some built in functionalities and blocks. medium-draft is available in the global object as MediumDraft. (The number 1 and a period) - unordered-list-item. - (A hyphen and a space) - unordered-list-item.* (An asterisk and a space) - unordered-list-item.(An asterisk and a period) - unordered-list-item. - If current block is blockquote, it will be changed to block-quote-caption, else caption.Special characters while typing: While typing in an empty block, if the content matches one of the following, that particular block's type and look will be changed to the corresponding block specified below Alt + Shift + L - Load previously saved data from localstorage.Command/CTRL + S - Save current data to localstorage.These commands are not a part of the core editor but have been implemented in the example code that uses the medium-draft editor. CMD/CTRL + SHIFT + K -> Remove link if cursor is inside a word with link.inline: įollowing are the keyboard shortcuts to toggle block types ( Alt and CTRL for Windows/Linux and Option and Command for OSX).Easily customizable toolbar via toolbarConfig for the following block and inline styles.block-quote-caption - Caption for blockquotes.caption - Can be used as a caption for media blocks like image or video instead of nested draft-js instances for simplicity.It also has implementations of some custom blocks like:.Image addition with support for rich text captioning.Focus on keyboard shortcuts and auto transform of text blocks.medium-draft - demoĪ medium like rich text editor built upon draft-js with an emphasis on eliminating mouse usage by adding relevant keyboard shortcuts. Latest development is going on in this branch.
0 Comments
Read More
Leave a Reply. |