We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

remove item from content menu

Hi,
The document editor context menu has a default item for "New Comment".
How do I remove this item? 
All the other items are great.

21 Replies

HC Harini Chellappa Syncfusion Team January 27, 2020 09:19 AM UTC

Hi Bob, 

Syncfusion Greetings 

Document editor doesn’t provide any API for removing default items on context menu.  

If your requirement is to disable comments support, then we have logged a feature request for this. It will be included in our upcoming EJ2 patch release which is tentatively scheduled on Feb 5, 2020. Once included, will update you. You can track the status of this feature from the below link. 


Regards, 
Harini C 



BI bob ingham January 27, 2020 12:50 PM UTC

Hi Harini,

Thanks for the speedy reply.
I will continue to monitor the situation.

Cheers,
Bob


PR Padmini Ramamurthy Syncfusion Team January 29, 2020 05:28 AM UTC

Hi Bob, 
  
We will also keep you updated. 
  
Regards, 
Padmini  
  



HC Harini Chellappa Syncfusion Team February 5, 2020 01:58 PM UTC

Hi Bob, 

We are glad to announce that our EJ2 patch (v17.4.47) release is rolled out successfully and In that release, we have included this feature. 
      
Please upgrade to the latest version packages for this feature.                

Note: By default, comment support will be disabled. To enable comments, you can set enableComment property. 
 
Sample Code 
<ejs-documenteditorcontainer #documenteditor_default [enableToolbar]=true [enableComment]=true [locale]="culture" (created)="onCreate()" 
                (documentChange)="onDocumentChange()" style="display:block;height:600px"></ejs-documenteditorcontainer> 
 
 

Regards, 
Harini C 



BI bob ingham February 5, 2020 10:39 PM UTC

Hi Harini,

Thanks for the information and the patch.
Strange, 17.4.47 is not mentioned on your release page yet, I found the details in the github angular repository but I think the changes were made in the underlying js files.
And, moreover, the document editor is not listed on the products to the left on the menu.
One more thing - that's the wrong link you gave me - it should have been https://www.npmjs.com/package/@syncfusion/ej2-angular-documenteditor!!!

Finally, it doesn't work:
I can't get your insert image button to work....
And after all that, there is a bug in 17.4.47 code of the underlying document-editor.js source file which I have reported in github in the angular repository.

Thanks again for the attention.

Cheers,
Bob


HC Harini Chellappa Syncfusion Team February 6, 2020 01:30 PM UTC

Hi Bob, 

Apologies! 


Please check the below link for release notes of document editor. 


Link which you shared is not opening. Kindly check it. 
  
In which scenario, image is not inserted? Please share the steps to reproduce this issue. 


##Regarding the issue which you reported in Github 


We have logged defect report and fix will be included in our upcoming EJ2 patch release which is tentatively scheduled on Feb 12, 2020. once included will update you. 

Regards, 
Harini C 



BI bob ingham February 6, 2020 02:34 PM UTC

Hi Harini,

Thanks.  Not sure what is wrong with the link.  I have zipped and attached.
click here for image problem

Cheers,
Bob

Attachment: 20200205174422_c1fe6e5.zip


HC Harini Chellappa Syncfusion Team February 7, 2020 12:20 PM UTC

Hi Bob,  

Thank you for the sharing. 

We have checked the screenshot shared by you. 

Please ensure whether node modules are updated.  

kindly refer the below sample with later version of document editor. 
Please let us know if you have any concerns. 

Regards, 
Harini C 



BI bob ingham February 7, 2020 12:25 PM UTC

Hi Harini,

Can you try your example again with [enableToolbar]=false instead of [enableToolbar]=true


HC Harini Chellappa Syncfusion Team February 10, 2020 12:08 PM UTC

Hi Bob, 

We tried disabling toolbar. toolbar disabled. Along with that, console error occurs "toolbar of undefined"

https://stackblitz.com/edit/angular-zbs2vi-enpu7c?file=app.component.html

we have already logged defect report for this and shared you the fix timeline.

if this not your reported scenario, kindly share the video demonstration to reproduce the issue. 

Regards, 
Harini C 



BI bob ingham February 10, 2020 12:18 PM UTC

Thanks, Harini, tentatively looking forward to 12th when I can switch off the toolbar again!


HC Harini Chellappa Syncfusion Team February 11, 2020 01:40 PM UTC

Hi Bob,  

We are glad to announce that our EJ2 patch (v17.4.49) release is rolled out successfully and In that  release, we have included fix for the reported scenario.  

Please upgrade to the latest version packages to resolve the issues. 


Release notes 

  
Regards,  
Harini C  



BI bob ingham February 11, 2020 03:12 PM UTC

Hi Harini,
That's got rid of the error for the toolbar but the "[enableComment]=true" doesn't work:
And we seem to have an additional "Hyperlink" option.  Can this be removed also?
Sorry to be a pain,
Bob


HC Harini Chellappa Syncfusion Team February 12, 2020 08:41 AM UTC

Hi Bob, 

Sorry for the inconvenience!  

Currently we are working on the reported scenario. Meantime to resolve this issue, you can set enableComment property to false in created event of DocumentEditorContainer or DocumentEditor.  

SampleCode  

this.container.enableComment = false;  


Kindly refer the below sample  


In app.component.ts, under onCreated method, we have set enableComment to false.  

We will include the fix in our upcoming EJ2 patch release which is tentatively scheduled on Feb 19, 2020. Once included will update you.  

Reg. removing hyperlink option 
 
If you want to hide the option in context menu. You can try customizing context menu. You can add custom options in context menu and hide the default options. 

Please refer the below documentation, where you can hide the context menu with default options and show the custom context menu options. 


Please let us know if you need any further assistance.

 
Regards, 
Harini C

 



BI bob ingham February 12, 2020 07:21 PM UTC

Hi Harini,

Looks like I'm going to have to spend more time learning the context menu which I didn't want to do.
Your linked instructions appear to be badly named, Hide default context menu items, there is nothing in that article which refers to hiding context menu items.
It simply defines a new custom menu and then begins to add properties.
I tried to use a simple splice operation but that didn't work either:
this.documentContainer.documentEditor.contextMenu.menuItems.splice(5, 2);
Why do you have an addMenuItem but no removeMenuItem?
The menu appears to be contextual so I don't want to mess about too much - thus table options appear when the cursor is over a table and that's great.
But I'd just like to get rid of the comment and hyperlink options.

Cheers,
Bob





HC Harini Chellappa Syncfusion Team February 13, 2020 12:27 PM UTC

Hi Bob, 

Apologies! 

Can you please confirm us whether you are expecting to disable the hyperlink dialog module or to hide the hyperlink option alone in context menu? 

Note: Disabling the hyperlink dialog module will remove the hyperlink dialog module and hide the hyperlink option in context menu and link button in the toolbar.

Please let us know if you have any concerns. 

Regards, 
Harini C 



BI bob ingham February 13, 2020 01:55 PM UTC

Hi Harini,

Great service, thanks for getting back again.
My use case is that I have users who are updating pre-defined and pre-formatted documents.
They simply put scores into a table column and then add a total at the end as you can see in this image.
Therefore I don't want them to be changing the document at all, in fact I want to set editable regions but was unable to do that directly in Word (I will try do this using the syncfusion editor later).
They may need to add rows to the table so the context help is great for this, it allows them to add and remove rows.
But I don't want them adding comments or adding hyperlinks so I would rather just not have these options on the context menu.

So, in answer to your question:
"Disabling the hyperlink dialog module will remove the hyperlink dialog module and hide the hyperlink option in context menu and link button in the toolbar.
Please let us know if you have any concerns."
I have no concerns at all.
Great work and thanks a lot for helping.
Bob


HC Harini Chellappa Syncfusion Team February 14, 2020 11:28 AM UTC

Hi Bob, 

For this, you can set enableHyperlinkDialog of document editor to false in created event of document editor container.   

containerInstance.documentEditor. enableHyperlinkDialog = false 

This will hide the hyperlink option from context menu. But the separator will be visible. We have logged defect report for this, and fix will be included in our upcoming EJ2 patch release which is tentatively scheduled on Feb 26, 2020. Once included, will update you. 

Regards, 
Harini C 



BI bob ingham February 14, 2020 12:41 PM UTC

Hi Harini,

Fantastic, I can confirm that worked.
Once we get editable regions and remove the "add comment" option we're cooking on gas!
Thanks for all your help, it's a pleasure working with you.

Cheers,
Bob



SM Suriya Murugan Syncfusion Team February 17, 2020 11:30 AM UTC

Hi Bob, 

Thanks for your update. 

Regards, 

Suriya M. 



HC Harini Chellappa Syncfusion Team February 26, 2020 09:09 AM UTC

Hi Bob, 

We are glad to announce that our EJ2 patch release (v17.4.51) has been rolled out successfully. We have included fix for the “separator visible when hyperlink item is removed in context menu” issue. 

Please upgrade to the latest version packages to resolve this issue.               


Release notes 

Regards, 
Harini C 


Loader.
Live Chat Icon For mobile
Up arrow icon