Hide Components from Dialogs

Is it possible to hide items.

For example, I would like to remove the title and the checkbox from the insert link dialog for the HTML editor.






3 Replies

IS Indrajith Srinivasan Syncfusion Team April 21, 2020 11:23 AM UTC

Hi Ricardo,

Greetings from Syncfusion support,

We have validated your reported query. Yes, you can remove the title and the checkbox elements from the InsertLink dialog in the beforeDialogOpen event. We have also prepared a sample based on your requirements.

API link: https://ej2.syncfusion.com/vue/documentation/api/rich-text-editor#beforedialogopen

Sample: https://codesandbox.io/s/vue-template-12687

Please let us know if the solution helps,

Regards,
 
Indrajith 



RI Ricardo April 21, 2020 01:20 PM UTC

Dear Syncfusion Support Team,

it's true, the elements are gone, but this creates a new problem. Because the querySelector ('. e-rte-linkTitle') element was removed, the code from link-module in line 298 generates an error.


var linkTitle;
if (this.selfLink.parent.editorMode === 'HTML') {
linkTitle = linkEle.querySelector('.e-rte-linkTitle').value;
}


Since the element does not exist, an type error is generated. This means that no links can be inserted in the editor (which is the point and purpose).


Regards,

Ricardo





IS Indrajith Srinivasan Syncfusion Team April 22, 2020 01:43 PM UTC

Hi Ricardo,

Good day to you,

We have validated your reported query. Due to the removal of the element this issue occurs. Instead, we can hide the display of the element from view. So that the insertLink also works fine. We have modified the sample shared yesterday.

Sample: https://codesandbox.io/s/vue-template-0n71u?file=/src/App.vue

Please let us know if the solution helps.

Regards,
 
Indrajith 


Loader.
Up arrow icon