TinyMCE Improvements: Open links from note window with popup and auto-create links (for 4.0 branch)#450
TinyMCE Improvements: Open links from note window with popup and auto-create links (for 4.0 branch)#450jlegewie wants to merge 1 commit intozotero:4.0from jlegewie:4.0
Conversation
|
no idea what was going on with the indent but it's fixed. |
|
I'll look into passing through the modifier keys and getting this to work in separate note windows. For contextmenu, it looks like this will be easier once we upgrade to TinyMCE 4, which lets you define menu items that can then be added to the menu. In the meantime, we can just include the non-minified version from GitHub — I assume it's just this — and add a comment that says "// Added by Zotero".
I can look into it. Otherwise, this looks good. You can squash these commits together into a single one for merging. |
|
I replaced the |
|
Sorry, could you just clean up that commit message a little and remove unnecessary stuff ("Indent correctly")? You can use Also, can you add a comment to the top of linksmenu/editor_plugin.js saying that it's based on the TinyMCE contextmenu plugin (which I think is what you said)? |
|
Sorry, my git skills are still pretty bad. The message is fixed. There already is a comment saying * This plugin adds a left-click context menu to links in the TinyMCE editor for Zotero.
* Code adopted and modified from TinyMCE contextmenu plugin.Anything missing? |
- Send modifier keys through to loadURI() when clicking Open Link in notes - Open link in parent window from external note window - Don't show both menus on right-click Follow-up from #450
TinyMCE Improvements: Open links from note window with popup and auto-create links
Sorry, missed that. Merged into 4.0. Note that I rebased your commit again to convert spaces to tabs (which are what we use) in linksmenu/editor_plugin.js, so you'll probably need to rewind to before these changes with Thanks for working on this! |
|
Now available for testing in 4.0.18-beta.r5. |
|
Great! I will use and test it a little. |
Okay, here is an updated version for the 4.0 branch.
I have Moved the pull-request.
I tried but have problems doing this because I am unable to get the original event. Maybe you have an idea what's going on. Currently, the linksmenu plugin adds a command using
ed.addCommand('openlink', which callszoteroHandleEventwith a fake event (but without .shiftKey, etc.). This 'openlink' command is called when the user clicks the button based on this linecmd : 'openlink'in the definition of theOpen Linkbutton. The command is not an event though so that I don't know how to get the data. An alternative would be to replacecmd : 'openlink'withonclick: function() {... call to zoteroHandleEvent...but that function only gets the node as an argument not the event.linksmenuplugin contains all the relevant code. There is, however, a second place were I used to modify tinymce code. I changed thecontextmenuplugin to add the open button to the right click menu as well. It's a little annoying because the contextmenu plugin is minified so that my small change replaces the entire plugin. I don't think there is a workaround for that. This pull request does not include this commit for now. I can add the commit, I could create a new plugincontextmenu2with the modification, or theopen linkbutton does not appear in the right-click menu but I think it's nice. What is your preference?For me, two finger click on touchpad is right click (OSX/Firefox) and I can't reproduce the problem. So it would be great if you can take a look.
I remove the Unlink button from the toolbar.
loadURI, which might try to open the link in the separate note window.