Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when editing node after changing to markdown #42

Open
bp1189 opened this issue Aug 2, 2022 · 1 comment
Open

Error when editing node after changing to markdown #42

bp1189 opened this issue Aug 2, 2022 · 1 comment

Comments

@bp1189
Copy link

bp1189 commented Aug 2, 2022

I noticed an error when changing a node to the Markdown tiddler format and then double-clicking to edit it from the parent node's tiddler.

Error is:
Uncaught Reference error: EDITOR_MAPPING_PREFIX is not defined

I am using the latest version of Chrome on Windows 10 and Android 12.

Steps to reproduce:

  1. Download new empty.html from TiddlyWiki.com
  2. Install Streams and Markdown plugins
  3. Create a new tiddler
  4. Add a new node
  5. Edit the node's tiddler to be the Markdown type
  6. Double-click in the first tiddler on the new node
  7. See error

Let me know if you have any questions or if this belongs in the main TW GitHub issues instead.
Thanks!

@rayleandro
Copy link

Hi I just faced this issue and I think I figured out where the problem is.

EDITOR_MAPPING_PREFIX is used in the file widgets/streams-edit.js but it's not initially defined. The code that uses the variable is only run when the tiddler type isn't vnd.tiddlywiki, so usually, there aren't any errors. The not defined error only kicks in when the tiddler type is changed, like to markdown.

My solution (I'm using Tiddlywiki on node, so I'm using plugin folders and I can edit the plugin code easily) was to intialize the EDITOR_MAPPING_PREFIX variable with "$:/config/EditorTypeMappings/".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants