marktext/docs/dev/code/BLOCK_ADDITION_PROPERTY.md
Ran Luo 289b17c015 Optimization of table block (#1456)
* Prepare for drag and drop row and column

* remove regexp th|td

* render drag button

* Feat: support drag and drop row and column of table

* Feat: table bar tools

* remove unnecessary codes

* Feat: support select multiple cells

* Do not show table drag bar when selected cells

* Feat: support delete selected cells content or remove row/column/table

* Feat: select one cell or table when press ctrl + a

* Support select all content

* Remove table tools in context menu

* Feat: support copy paste selected cells as sub table

* Fix: PR issue 1 press tab will not show the table drag bars

* Select one cell and press backspace will cause bug

* Fix: The table drag bar location error when there are tow tables in the editor

* Fix unable copy and paste 1* n or n * 1 table

* Drag any row to the top to editor will cause error.

* Update table resize icon

* Fix: table resize is not work in table tool bar

* Fix: No need to show left drag bar if only one row, and no need to show bottom drag bar if only one column.

* Fix: Create an empty table in source code mode, turn to preview mode, there are more than two drag bars in one table.

* Fix: resize table

* Opti: table is not 100% width now

* Fix drag in one row or column

* Change table delete icon

* Fix: backspace is not work

* Little style opti

* Fix: cmd + enter bug

* Update the table drag bar context menu text

* Handle delete key when select table cells

* remove all unnecessary debug codes

* Feat: support cut selected cells and copy/cut by context menu

* Fix typo

* Rename some methods name

* Fix an issue when drag and drop table drag bar

* fix do not handle cell selection when the context menu shown

* Do not handle select cells when mouse up outside table
2019-10-13 13:23:00 +02:00

1.8 KiB
Raw Blame History

Block addition properties and its value

1. span
  • functionType

    • languageInput

    • codeContent (used in code block)

    • cellContent (used in table cell, it's parent must be th or td block)

    • atxLine (can not contain soft line break and hard line break use in atx heading)

    • thematicBreakLine (can not contain soft line break and hard line break use in thematic break)

    • paragraphContent (defaultValue use in paragraph and setext heading)

  • lang - only when it's functionType is codeContent

    • All prismjs support language or empty string
2. div

used for preview block math, mermaid, flowchart, vega-lite, sequence and html block.

  • functionType

    • multiplemath

    • mermaid

    • flowchart

    • vega-lite

    • sequence

    • html

3. figure

The container block of table, html, block math, mermaid,flowchart,vega-lite,sequence.

  • functionType

    • table

    • html

    • multiplemath

    • mermaid

    • flowchart

    • vega-lite

    • sequence

4. pre

Used for html,block math,mermaid,flowchart,vega-lite,sequence code block.

  • functionType

    • html

    • multiplemath

    • mermaid

    • flowchart

    • vega-lite

    • sequence

    • fencecode

    • indentcode

    • frontmatter

  • lang

    • all prismjs support language or empty string
5. code
  • lang

    • all prismjs support language or empty string
ul
  • listType

    • bullet

    • task

ol
  • listType

    • order
  • start

    • 0-999999999
li
  • listItemType

    • order

    • bullet

    • task

  • isLooseListItem

    • true

    • false

  • bulletMarkerOrDelimiter

    • bulletMarker-, +, *

    • Delimiter ), .

h1~6
  • headingStyle

    • atx

    • setext

  • marker - only setext heading has marker

input
  • checked

    • true

    • false

table
  • row

  • column

th/td
  • align

  • column