unotes icon indicating copy to clipboard operation
unotes copied to clipboard

Upgrade tui.editor from version 2.5 to version 3.x (#137)

Open kiyoka opened this issue 2 years ago • 2 comments

Migrated to tui.editor 3.2.1 or higher. This fixed some bugs caused by older version of tui.editor.

Target Unotes version: 1.4.4

Description

Issue fixed by upgrading Tui.editor

  • Fixes #81
  • Fixes #91
  • Fixes #121
  • Fixes #138

This is a critical issue that prevents usability, so I fixed it.

  • Fixes #113
  • Fixes #118
  • Fixes #127

Migration

I Follow the migration guide below. https://github.com/nhn/tui.editor/blob/master/docs/v3.0-migration-guide.md

Tested

  • Tested only on Windows 11 Home.
  • Checked if the theme follows dark mode.
  • Checked if the toolbar order has not been changed.
  • Checked if the image is saved as a local file when pasting an image.
  • Checked if Template Notes works.
  • Checked if the chart plugin works.
  • Checked if the PlantUML plugin works.
  • Checked if the Katex plugin works.
  • Checked if code syntax highlighting works.
  • Checked if all keyboard shortcuts of Unotes work.( Ctrl + Alt + ... )

Notice

tui.editor 3.2.0 has a fatal bug. https://github.com/nhn/tui.editor/pull/2729 This issue has been fixed in tui.editor 3.2.1, so we need to use 3.2.1 or higher.

kiyoka avatar Sep 29 '22 11:09 kiyoka

@ryanmcalister I have committed. Here, try this.

  1. I have dropped codeblock support. The reason is that it conflicts with codeSyntaxHighlight plugin in tui.editor 3.x. If the formula drawn in codeblock with Katex's Plugin, codeSyntaxHighlight overwrites it and breaks it.

  2. character escape feature tui.editor 3.x seems to have a feature to escape (_). If you save a file before enclosing it in $$, it seems that (_) is converted to (\_). Latex strings enclosed in $$ previously do not seem to be converted even after reloading.

inline_katex

kiyoka avatar Oct 06 '22 14:10 kiyoka

2. Latex strings enclosed in $$ previously do not seem to be converted even after reloading.

hmm, I'm still seeing the escaping of _ when I reload the note or switch between markdown.

ryanmcalister avatar Oct 06 '22 16:10 ryanmcalister

Thanks for the PR. I really appreciate the work done here!

ryanmcalister avatar Oct 20 '22 15:10 ryanmcalister