wangEditor
wangEditor copied to clipboard
Right-click to display hover menu - 右鍵單擊以顯示懸停選單
EN: I don't speak Chinese. So the Google Translate software I currently use may have some flaws. So I want to show the hover bar whenever the user clicks on the right side of the mouse device. I read the documentation but can't find a solution to my problem. CN: 我不會說中文。所以我目前使用的Google翻譯軟體可能會有一些缺陷。因此,我想每當用戶單擊滑鼠設備的右側時顯示懸停欄。我閱讀了文檔,但找不到解決我的問題的方法。
Also it would have been better if someone helps me to figure out how to manually open the image explorer in the editor so that I could open it manually when user clicks some button outside of the editor.
do you mean something like this?
if you want click the side hover bar and insert node,that need dev a new side bar. There is currently no such option within wangeditor. I think that is important,if you want do it,you can dev in wangeditor-next
Also it would have been better if someone helps me to figure out how to manually open the image explorer in the editor so that I could open it manually when user clicks some button outside of the editor.
If you want to open the image explorer, you can open the Upload Image menu with a hotkey. And if you're going to set a hotkey, you need to reconstruct this menu
This site (https://huixie.iflyrec.com/list) was developed using WangEditor to create a sidebar. You can try cloning it.
do you mean something like this?
if you want click the side hover bar and insert node,that need dev a new side bar. There is currently no such option within wangeditor. I think that is important,if you want do it,you can dev in wangeditor-next
I had to make a component to create tests and the options also had to allow user to upload image and have the functionality of the text editor. I wanted to make a custom context menu which would have been displayed whenever user clicked right side of his mouse (whom's default behaviour is displaying browsers inbuilt context menu). I ended up making something like this by placing the toolbar on the right side and attaching custom made button after registering it to the wang editor Boot.
But there is still a problem.
The button's are getting disable whenever editor loses focus and I do not want that.
It can be controlled by modifying the isDisabled method. It can also be clicked without selection. like that https://github.com/cycleccc/wangEditor-next/blob/139268eac7ea2f9444d99263f08e8525b9fc5cf0/packages/basic-modules/src/modules/divider/menu/InsertDividerMenu.ts#L25
It can be controlled by modifying the isDisabled method. It can also be clicked without selection. like that https://github.com/cycleccc/wangEditor-next/blob/139268eac7ea2f9444d99263f08e8525b9fc5cf0/packages/basic-modules/src/modules/divider/menu/InsertDividerMenu.ts#L25
Oh never mind. I was not aware that the alwaysEnable option was already available in the IButtonInterface: https://github.com/wangeditor-team/wangEditor/blob/master/packages/core/src/menus/interface.ts#L35
