notes icon indicating copy to clipboard operation
notes copied to clipboard

Rich Text Editor does not Insert Links with Proper Markedown [title](url...)

Open drankinatty opened this issue 2 years ago • 0 comments

NC Notes Rich Text Editor does not insert links with proper Markdown syntax

Steps to reproduce

  1. Create Note, choose Insert Link
  2. Type URL

Expected behaviour

Tell us what should happen

"Markdown" format for a link is [text to display](URL...) which will display "text to display" with hyperlink to "URL...". When entering a link in NC Notes, the user should have the ability to insert "text to display" as well as the URL. For markdown link reference, see the Wikipedia link Markdown that the Notes Readme.md references.

(and curiously, simply copying a link and pasting here in this new Issue on github uses the proper markdown syntax... for the link)

Actual behaviour

Tell us what happens instead

Instead of allowing input of text to display and inserting the link with proper markdown format, NC Notes places the URL between < url... > and displays only the raw URL followed by rectangular box containing the link at the page title (if available) in Rich Text Editor Mode, and displays only the raw URL in Preview mode.

Screenshots

If applicable, add screenshots to help explain your problem.

Attempting to enter a link to https://www.mysite.com with the text to display as "mysite" is impossible in Rich Text Mode. Instead you enter the link and are left with:

nc-RTM-link

Attempting to enter a link in proper markdown format in Rich Text Mode fails, e.g.

nc-attempt-to-enter-link

(note: how NC crams the URL between < ... > inside the attempted proper markdown format and escapes the \[ ... \] of the proper markdown)

It's only after changing "Note Settings" to display in Preview/Edit mode that you can fix the incorrect markdown format inserted by NC Notes in Rich Text Mode, e.g.

nc-manually-edit-link

Now, finally, the link displays properly in BOTH Preview and Rich Text Mode:

nc-final-link

Server

Please complete the following information.

  • Notes app version: 4.8.1
  • Nextcloud version: 27.1.2
  • OS: Archlinux: 6.5.7-arch1-1
  • Web server: Apache / 2.4.57 (Unix)
  • PHP version: PHP / 8.1.23
  • Database: mariadb / 11.1.2-1

Nextcloud configuration:

``` { "system": { "datadirectory": "***REMOVED SENSITIVE VALUE***", "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "default_locale": "en_US", "default_phone_region": "US", "knowledgebaseenabled": true, "apps_paths": [ { "path": "\/usr\/share\/webapps\/nextcloud\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/lib\/nextcloud\/apps", "url": "\/wapps", "writable": true } ], "trusted_domains": [ "localhost", "2pi.mysite.com", "192.168.6.111" ], "overwrite.cli.url": "https:\/\/2pi.3111skyline.com\/nextcloud", "htaccess.RewriteBase": "\/nextcloud", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "27.1.2.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "maintenance": false, "app_install_overwrite": [ "issuetemplate" ], "theme": "", "loglevel": 2, "memcache.local": "\\OC\\Memcache\\APCu", "filelocking.enabled": true, "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 } } }
</details>


## Client
Please complete the following information.

- Browser (incl. version): Firefox 115.3.1esr (64-bit)
 - OS: Archlinux


## Log files
N/A

drankinatty avatar Oct 18 '23 03:10 drankinatty