# slate-md-serializer **Repository Path**: zzcwzhang/slate-md-serializer ## Basic Information - **Project Name**: slate-md-serializer - **Description**: A Markdown serializer for the Slate editor framework - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![npm version](https://badge.fury.io/js/slate-md-serializer.svg)](https://badge.fury.io/js/slate-md-serializer) [![CircleCI](https://circleci.com/gh/tommoor/slate-md-serializer.svg?style=svg)](https://circleci.com/gh/tommoor/slate-md-serializer) # Slate Markdown Serializer A Markdown serializer for the [Slate Editor](http://slatejs.org). Requires Slate 0.32+. ## renderMark This serializer supports the following Slate marks: ```javascript function renderMark(props) { switch (props.mark.type) { case 'bold': return {props.children}; case 'code': return {props.children}; case 'italic': return {props.children}; case 'underlined': return {props.children}; case 'deleted': return {props.children}; case 'added': return {props.children}; default: } } ``` ## renderNode This serializer supports the following Slate node keys: ```javascript function renderNode(props) { const { attributes } = props; switch (props.node.type) { case 'paragraph': return ; case 'block-quote': return
{props.children}
; case 'bulleted-list': return ; case 'ordered-list': return
    {props.children}
; case 'todo-list': return ; case 'table': return {props.children}
; case 'table-row': return {props.children}; case 'table-head': return {props.children}; case 'table-cell': return {props.children}; case 'list-item': return
  • {props.children}
  • ; case 'horizontal-rule': return
    ; case 'code': return {props.children}; case 'image': return ; case 'link': return {props.children}; case 'heading1': return

    {props.children}

    ; case 'heading2': return

    {props.children}

    ; case 'heading3': return

    {props.children}

    ; case 'heading4': return

    {props.children}

    ; case 'heading5': return
    {props.children}
    ; case 'heading6': return
    {props.children}
    ; default: } }; ```