TinyMCE4 CTRL + Rightclick to open browser's default context menu - tinymce

I would like to be able to open default context menu of my browser on some defined action (in my case ctrl + rightclick) instead of TinyMCE's standard context menu.
The case is I'm using browser's spell checking and I want to be able to chose a correction from proposed words. At the moment I use a temporary which is disabling the context menu of TinyMCE, but I would like it to work like normal, but with CTRL + rightclick to open normal browser's context menu.
Do you have any hints how to do that? I couldn't find anything in standard tinymce specifications

I don't know if there is a better way to do it, but I managed to solve my problem. I edited contextmenu plugin. In development version I just added this stuff to the function which handles the oncontextmenu event:
editor.on('contextmenu', function(e) {
if (e.ctrlKey) {
return;
} else {
e.preventDefault();
}
In plugin.min.js file I changed the e.on(...) to:
(...) e.on("contextmenu",function(n){var i;if(n.ctrlKey){return;}else{n.preventDefault();}if(i=e.settings.contextmenu|| (...)

Related

How do I open NetBeans HMTL context menu?

I'm creating a simple HTML webpage and, I don't know how, I opened a context menu that has many graphic items like buttons, checkboxes and so.
How do I open that context menu? It seems like a simpler way to create a webpage.
Do you mean Window / IDE Tools / Palette (Ctrl + Shift + 8)?

How to turn off the Quick Fix popup in VS Code

I am running VS Code 1.52.1 in Windows, editing JavaScript code. I am a double-click, copy & paste junkie. I mouse over something, like a function name, with the intent to double click copy it to the clipboard. But sometimes VS Code wants to suggest a "Quick Fix". This would be OK with me, except that the Quick Fix is displayed in a popup that overlays the code I am attempting to copy. Depending on how fast I am working, I may not notice until I paste the "old" contents of the clipboard into my target location.
Take the following function, for example.
// function to allow a promise-oriented caller to invoke
// a callback-oriented function
function callbackToPromise( resolve, reject ) {
return function done( err, data ) {
if(err) {
reject(err);
}
else {
resolve(data);
}
}
}
I mouse over the function name and the Quick Fix appears, overlaying the line of code where the mouse is hovering. The fix itself is redacted to avoid irrelevant discussion.
This behavior is both inconvenient and annoying, as it shifts my focus from the code to the misbehaving tool. It's like stubbing my toe a dozen times a day.
How can I configure VS Code not to automatically display Quick Fix popups? I would much prefer if VS Code would simply underline the function name and let me press the hotkey to see the popup.
I'm not aware of an exact/direct setting for the Quick Fix suggestion. What you can do though is to control the entire popup: increase the delay or disable it on mouse hover, then use shortcut keys to show it only when you want it to.
The settings for the mouse hover are editor.hover.*:
"editor.hover.delay": 300,
"editor.hover.enabled": true,
"editor.hover.sticky": true,
Set editor.hover.delay to some "high" value, so it gives you time to double-click to copy things before the popup appears. Or, disable it entirely with editor.hover.enabled.
As for the hotkeys, in Keyboard Shortcuts, there's editor.action.showHover:
You can disable the popup on mouse hover with editor.hover.enabled set to false, and then just use the shortcut key to show it manually (I'm using a Mac so it's showing Mac shortcut keys. There should also be one for Windows.)
From the popup, there's also a shortcut key for directly showing the Quick Fix suggestions. You can also configure that from Keyboard Shortcuts as editor.action.quickFix:
Again, you can disable the popup on mouse hover with editor.hover.enabled set to false and then just use the Quick Fix shortcut key to show it as needed.
In Windows 10 this is how I did it: Settings -> Text Editor -> Quick Suggestions Delay.

Chrome Devtools Workspaces Autosave Javascript and HTML

I know about this tool https://github.com/NV/chrome-devtools-autosave
However, I would like to set up the workspaces manually in Chrome. If I apply new styles on the Styles panel they will be persisted automatically.
But when I enter new HTML or javascript, i have to press Ctrl + S, Ctrl + R in order to see the changes. I can't turn on autosave. Perhaps there is a setting in the settings panel, or a simple extension which will do this?
This is the feature request you are looking for. Unfortunately they don't seem to be in any hurry so I advice to star it by as many people as possible.
CTRL + SHIFT + S for saving all files

What are the shortcuts keys for Netbeans code folding?

Does anybody know a shortcut to fold/unfold (collapse/expand) all classes/methods in a php file using netbeans?
To Collapse: Ctrl+Shift+Minus (on the keypad)
To Expand: Ctrl+Shift+Plus (on the keypad)
This works regardless of what language your using, (Tested on PHP, HTML, CSS & Javascript)
But you can find out the keyboard shortcuts easily yourself, and even change them:
Open the Options Dialog (Tools -> Options)
Then Select Keymap
Enter "Collapse" into the input field labelled "Search" and all shortcuts for that action are displayed. You can do the same for "Expand All"
I found the Collapse All function to be a pain because it even collapses the nested blocks inside of your methods. There seems to be no collapse methods shortcut.
If you are like me and just want the methods and comments collapsed by default this can be configured in the preferences.
Under Editor->Folding in your Preferences click on the language dropdown and select PHP.
Check the 'Functions and methods' checkbox.
Check the 'PHPDoc documentation' checkbox.
This will probably yield the result you are looking for.
I also like to uncheck the 'Show summary' checkbox to reduce visual noise.
You can still use the Expand All shortcut key as described in the other post if you wish to see everything.

Does Eclipse have a plugin for code clips like in Coda?

There is a very useful "Clips" feature in Coda, does Eclipse have such feature?
What it does is pretty simple, you save a code clip once, which you use very often and assign it a shortcut and when you want to re-use you type the shortcut and it automatically pastes it and sets the caret at the defined position.
e.g. when I type 4dom and press TAB it types this:
jQuery(function($){
//puts cursor here
});
so, how do you do this in Eclipse?
In Eclipse they are called Templates. You can find this in Window->Preferences then JavaScript/Editor/Templates.
It will allow you to create or edit.
Similar function in Eclipse is called Snippets.
Find it by doing this:
click on Window > Show View > Other > General > Snippets