Adding right click options in context menus

EDIT by @Hrbrgr, Dates from @Magilla from comment below:

Win 11
LibreOffice version 7.3.2.2


How can a user add an item to context driven mouse menus? During the edit of a document I would like there to be a delete right click available so one does not have to use the delete key on the keyboard. The image uploaded is an example, the carriage return at the lower left point of the right click edit box in the image is what I want to delete with out using the “delete” key on the keyboard.

Context menu default:

81727 HB01 Screenshot 2022-09-12 211817

You can change the context menu.
From the menu, choose Tools>Customize....



In the Customize dialog, enter the word “Delete” for “Search”.
For “Target” select Text.
At “Available Commands” check “Delete Content”.
Press the right arrow.
Sort the “Delete Content” command.






Click OK.

The context menu now has a new command.

81727 HB04 Screenshot 2022-09-12 212100

Select the text you want to delete.
Right-click for the context menu and select the new command.
The selected text has now been deleted.


You can work through the same procedure for Backspace, for example.

81727 HB06 Screenshot 2022-09-12 212300

2 Likes

I have tried that and it does not appear to work on that particular right click menu.
Put your cursor between the word in the line and the para mark, the para mark itself can not be highlighted, right click and the menu that shows up does not appear to be modifiable or at least I can not find what the menu is called in order to modify it. When you hover over a misspelled word and right click the delete option is also not available either in the right click menu.

Put your cursor between the word in the line and the para mark, the para mark itself can not be highlighted, …

The paragraph marker is an internal control character, it will always be at the end of a paragraph and is not editable but of course they will not be printed either.
Click on the “Toggle Formatting Marks” ( Ctrl+F10 ) icon in the “Standard” toolbar to hide the display of the control characters.


What is a paragraph?

English documentation


Please, basically you have to specify the operating system and the LibreOffice version (three digits, e.g. 7.3.2). Thanks.


Here you can find the further Guidance for this page.

To reproduce the function, select the area (e.g. in the screenshot between the red lines). Place the cursor on the first red line.




Then choose the new selection “Delete Content” from the context menu.


Customize context menu in Writer


Using the search field, I can’t find a function that corresponds to the Del key. Maybe you can search better than I can.

As @Hrbrgr showed for the paragraph mark, there has to be a selected area to wich the “context” applies. This is different to the Text-cursor, where Backspace/Del work left/right of cursor.

It works exactly as you describe it, iif you use the correct command:

Del

1 Like

Delete Contents () is exactly that command.

2 Likes

@mikekaganski ,
yes you are right, it is also possible without marking. :+1:

Win 11
LibreOffice version 7.3.2.2
I realize the para mark is an unprintable control character, never thought is was anything else. I explained it that way because IF I put the cursor between it and the last character of the word and then push the delete key on the keyboard I can delete that para mark and connect the sentence like it is supposed to be … How do I put that function into the context driven right click menu so I can do ALL my editing using the mouse?

Please do not use answer (solution) boxes.
Edit your initial question or write comments. Thank you.

You could use Windows 11 built-in On Screen Keyboard or Touch Keyboard. Click the magnifying icon next to the start menu and enter one of those names.
Note that the Touch Keyboard has less functionality than the On Screen Keyboard