<commit_before>


## TODO

Discuss tokens / escaping / etc. with Joe

Images should support width/align for gfm (write raw_html)
(we'd need to do the image tag parsing for this to work).
May be as simple as just letting it through (as pandoc seems to automatically write html tags
if raw_html is supported but link_attributes aren't)
Alternatively, we could send inline html through the schema dom parser to see if it has an internal representation

Sizing/alignment inline for images

Clipboard / DragDrop support for images

Surface attributes

Better direct manipulation for tables

Unit testing for core panmirror code

Make character escaping configurable

Link input rule doesn't work for enter after link
(https://discuss.prosemirror.net/t/trigger-inputrule-on-enter/1118/2)


Cursor location for insert yaml in the middle of paragraph

Tables with a large number of columns are written as HTML when variable column widths are presented
(presumably b/c it can't represent the percentage granularity w/ markdown)
Perhaps don't set widths on all of the columns (only ones explicitly sized?)


improve scrolling with: https://github.com/cferdinandi/smooth-scroll

multimarkdown support is incomplete:
   -mmd_title_block
   -mmd_link_attributes (not written, likely limitation of pandoc)
   -mmd_header_identifiers (work fine, but we currently allow edit of classes + keyvalue for markdown_mmd) 

no support for +pandoc_title_block

We currently can't round-trip reference links (as pandoc doesn't seem to write them, this is
not disimillar from the situation w/ inline footnotes so may be fine)

showPandocWarnings treatment for RStudio IDE (including localization)

No editing support for fancy list auto-numbering (#. as list item that is auto-numbered)

handling for div with only an id (shading treatment a bit much?)

Direct parsing of citations (get rid of special post-processing + supported nested)
 (note: for nested we need excludes: '')

MathQuill/MathJax: 
   https://pboysen.github.io/
   https://discuss.prosemirror.net/t/odd-behavior-with-nodeview-and-atom-node/1521

critic markup: http://criticmarkup.com/

pandoc scholar: https://pandoc-scholar.github.io/
pandoc jats:    https://github.com/mfenner/pandoc-jats

pandoc schema: https://github.com/jgm/pandoc-types/blob/master/Text/Pandoc/Definition.hs#L94

Notes on preformance implications of scanning the entire document + some discussion of the tricky
nature of doing step by step inspection:
  https://discuss.prosemirror.net/t/changed-part-of-document/992
  https://discuss.prosemirror.net/t/reacting-to-node-adding-removing-changing/676
  https://discuss.prosemirror.net/t/undo-and-cursor-position/677/5


## Project/Build

Can we minify the typescript library?

https://fuse-box.org/docs/getting-started/typescript-project

Can we combine the editor library w/ the prosemirror/orderedmap dependencies?
https://github.com/fathyb/parcel-plugin-typescript


https://stackoverflow.com/questions/44893654/how-do-i-get-typescript-to-bundle-a-3rd-party-lib-from-node-modules

https://www.typescriptlang.org/docs/handbook/gulp.html
https://www.npmjs.com/package/@lernetz/gulp-typescript-bundle

https://webpack.js.org/guides/typescript/

https://github.com/gulp-community/gulp-concat


may need to make use of project references (allows mutliple tsconfig.json files
that all reference eachother)
   https://www.typescriptlang.org/docs/handbook/project-references.html
will ultimately need something like lerna:
   https://blog.logrocket.com/setting-up-a-monorepo-with-lerna-for-a-typescript-project-b6a81fe8e4f8/

create-react-app currently doesn't support project references:
   https://github.com/facebook/create-react-app/issues/6799

simple explanation:
   https://stackoverflow.com/questions/51631786/how-to-use-project-references-in-typescript-3-0
   https://gitlab.com/parzh/re-scaled/commit/ca47c1f6195b211ed5d61d2821864c8cecd86bad
   https://www.typescriptlang.org/docs/handbook/project-references.html#structuring-for-relative-modules<commit_msg>update todo w/ notes on resizing images<commit_after>## TODO

 Discuss tokens / escaping / etc. with Joe

CSS resize property might give us some stuff for free

<https://discuss.prosemirror.net/t/image-resize/1489> <https://medium.com/the-z/making-a-resizable-div-in-js-is-not-easy-as-you-think-bda19a1bc53d> <https://konvajs.org/docs/sandbox/Image_Resize.html>

<http://marcj.github.io/css-element-queries/> (Resize Sensor) on a div: .resizable { border: 1px solid black; width: 200px; height: 200px; resize: both; overflow: hidden; } sense resize events and update the image underneath (or just use a mutation observer) ResizeObserver polyfills: <https://github.com/WICG/ResizeObserver/issues/3> (<https://github.com/juggle/resize-observer>)

Images should support width/align for gfm (write raw\_html) (we'd need to do the image tag parsing for this to work). May be as simple as just letting it through (as pandoc seems to automatically write html tags if raw\_html is supported but link\_attributes aren't) Alternatively, we could send inline html through the schema dom parser to see if it has an internal representation

Sizing/alignment inline for images

Clipboard / DragDrop support for images

Surface attributes

Better direct manipulation for tables

Unit testing for core panmirror code

Make character escaping configurable

Link input rule doesn't work for enter after link (<https://discuss.prosemirror.net/t/trigger-inputrule-on-enter/1118/2>)

Cursor location for insert yaml in the middle of paragraph

Tables with a large number of columns are written as HTML when variable column widths are presented (presumably b/c it can't represent the percentage granularity w/ markdown) Perhaps don't set widths on all of the columns (only ones explicitly sized?)

improve scrolling with: <https://github.com/cferdinandi/smooth-scroll>

multimarkdown support is incomplete: -mmd\_title\_block -mmd\_link\_attributes (not written, likely limitation of pandoc) -mmd\_header\_identifiers (work fine, but we currently allow edit of classes + keyvalue for markdown\_mmd)

no support for +pandoc\_title\_block

We currently can't round-trip reference links (as pandoc doesn't seem to write them, this is not disimillar from the situation w/ inline footnotes so may be fine)

showPandocWarnings treatment for RStudio IDE (including localization)

No editing support for fancy list auto-numbering (\#. as list item that is auto-numbered)

handling for div with only an id (shading treatment a bit much?)

Direct parsing of citations (get rid of special post-processing + supported nested) (note: for nested we need excludes: '')

MathQuill/MathJax: <https://pboysen.github.io/> <https://discuss.prosemirror.net/t/odd-behavior-with-nodeview-and-atom-node/1521>

critic markup: <http://criticmarkup.com/>

pandoc scholar: <https://pandoc-scholar.github.io/> pandoc jats: <https://github.com/mfenner/pandoc-jats>

pandoc schema: <https://github.com/jgm/pandoc-types/blob/master/Text/Pandoc/Definition.hs#L94>

Notes on preformance implications of scanning the entire document + some discussion of the tricky nature of doing step by step inspection: <https://discuss.prosemirror.net/t/changed-part-of-document/992> <https://discuss.prosemirror.net/t/reacting-to-node-adding-removing-changing/676> <https://discuss.prosemirror.net/t/undo-and-cursor-position/677/5>

## Project/Build

Can we minify the typescript library?

<https://fuse-box.org/docs/getting-started/typescript-project>

Can we combine the editor library w/ the prosemirror/orderedmap dependencies? <https://github.com/fathyb/parcel-plugin-typescript>

<https://stackoverflow.com/questions/44893654/how-do-i-get-typescript-to-bundle-a-3rd-party-lib-from-node-modules>

<https://www.typescriptlang.org/docs/handbook/gulp.html> <https://www.npmjs.com/package/@lernetz/gulp-typescript-bundle>

<https://webpack.js.org/guides/typescript/>

<https://github.com/gulp-community/gulp-concat>

may need to make use of project references (allows mutliple tsconfig.json files that all reference eachother) <https://www.typescriptlang.org/docs/handbook/project-references.html> will ultimately need something like lerna: <https://blog.logrocket.com/setting-up-a-monorepo-with-lerna-for-a-typescript-project-b6a81fe8e4f8/>

create-react-app currently doesn't support project references: <https://github.com/facebook/create-react-app/issues/6799>

simple explanation: <https://stackoverflow.com/questions/51631786/how-to-use-project-references-in-typescript-3-0> <https://gitlab.com/parzh/re-scaled/commit/ca47c1f6195b211ed5d61d2821864c8cecd86bad> <https://www.typescriptlang.org/docs/handbook/project-references.html#structuring-for-relative-modules>
{'fraction_non_alphanumeric': 0.09910632447296058, 'fraction_numerical': 0.018675527039413383, 'mean_word_length': 4.776968894771675, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 51, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '112658', 'n_tokens_mistral': 2847, 'n_tokens_neox': 2632, 'n_words': 785}