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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

change text in pop up

Thread ID:

Created:

Updated:

Platform:

Replies:

150649 Jan 14,2020 03:43 PM UTC Jan 20,2020 06:36 PM UTC Angular - EJ 2 11
loading
Tags: RichTextEditor
JamesAdams
Asked On January 14, 2020 03:43 PM UTC

hi,

it's possible to chance the text in this pop up ? (Insert Hyperlink)



Indrajith Srinivasan [Syncfusion]
Replied On January 15, 2020 03:28 PM UTC

Hi James, 
Greetings from Syncfusion support 

Yes, you can customize the popup text using the locale property in RichTextEditor. We have also prepared a sample for your requirement.
 
  
Documentation: https://ej2.syncfusion.com/angular/documentation/rich-text-editor/globalization/#localization

Sample: https://stackblitz.com/edit/angular-l4tukn-9mrqit?file=app.component.ts

Can you please try out the above solution and let us know whether it meets your requirement.

Regards,
 
Indrajith 


JamesAdams
Replied On January 16, 2020 01:34 PM UTC

Hi !

thanks but i have to use variables for the text...

L10n.load({
  'fr-FR': {
    'richtexteditor': {
      bold: this.translate.instant('MARKDOWN.BOLD'),

Revanth Krishnan [Syncfusion]
Replied On January 17, 2020 08:40 AM UTC

Hi James, 
 
We have validated your query `To customize the popup text using a variable in the locale property in RichTextEditor` and provided the sample and code snippet for the same. In your scenario, the variables “this.translate.instant('MARKDOWN.BOLD')” must return some string value to work properly in the locale property. 
 
Code Snippet: 
 
this.customBoldText = 'Custom bold text stored in variable'; 
this.customItalicText = 'Custom italic text stored in variable'; 
this.customUnderlineText = 'Custom underline text stored in variable'; 
this.customLinkText = 'Custom link text stored in variable'; 
 
L10n.load({ 
  'en-US': { 
    'richtexteditor': { 
      bold: this.customBoldText, 
      italic: this.customItalicText, 
      underline: this.customUnderlineText, 
      createLink: this.customLinkText 
    } 
  } 
}); 
 
Please find the sample from the below location, 
 
Could you please try-out the above sample and code snippet and confirm whether it meets your requirement? If the above-shared sample doesn’t meet your requirements, kindly share with us more details regarding your requirement to provide an appropriate solution at the earliest. 
 
Thanks, 
Revanth G K 


JamesAdams
Replied On January 17, 2020 08:49 AM UTC

Hi,

it doesn't work for me because i use translate.instant ("'')

and translate.instant("")

is declared in the constructor: constructor(private translate: TranslateService){}

so i can't use it outside my class

JamesAdams
Replied On January 17, 2020 10:06 AM UTC

and it's not work for me

"Error: Uncaught (in promise): TypeError: Cannot set property 'customBoldText' of undefined
TypeError: Cannot set property 'customBoldText' of undefined

JamesAdams
Replied On January 17, 2020 10:13 AM UTC

it's possible to have this ?

<ejs-richtexteditor #toolsRTE [toolbarSettings]='tools' locale = "{'richtexteditor': {bold: 'test'}}">
</ejs-richtexteditor>

JamesAdams
Replied On January 17, 2020 10:33 AM UTC

I test that but it's not work

  public bold: object =  {
    tooltipText: this.translate.instant("MARKDOWN.BOLD"),
    template:
    '<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" type="button" id="mdDefault_toolbar_Bold" aria-label="Bold" tabindex="-1" style="width: auto;">' +
    '<span class="e-btn-icon e-bold e-icons"></span></button>'
  }

JamesAdams
Replied On January 17, 2020 10:55 AM UTC

I test that:

 public test: IToolsItemConfigs = {
    tooltip: "test",
    value: "test"
  }

    itemConfigs:{bold: this.test},

JamesAdams
Replied On January 17, 2020 02:36 PM UTC

It's possible to edit paragraph ?

i would like edit the name ant remove some option...



Indrajith Srinivasan [Syncfusion]
Replied On January 20, 2020 12:30 PM UTC

Hi James, 
  
Currently, we validating the reported scenario, will update further details shortly.  
  
Regards,
Indrajith
 


Indrajith Srinivasan [Syncfusion]
Replied On January 20, 2020 06:36 PM UTC

Hi James, 
 
Query 1: usage of translate.instant("") 
 
We couldn't conclude your requirement with the provided details, can you please share further details on this. In case of loading the custom text you can use the L10 load or local variables as mentioned before. 
 
Query 2:  it's possible to have this ? 
 
<ejs-richtexteditor #toolsRTE [toolbarSettings]='tools' locale = "{'richtexteditor': {bold: 'test'}}"> 
</ejs-richtexteditor> 
 
No, this is not possible with locale property.

Query 3: It's possible to edit paragraph ?

Yes, you can edit the name and remove the default formats using the Format property in RichTextEditor. Also you can apply desired styles to the formats using the CssClass property.

API: https://ej2.syncfusion.com/angular/documentation/api/rich-text-editor#format

Sample: https://stackblitz.com/edit/angular-l4tukn-7q3pkb?file=app.component.ts
 
 
Can you please try out the above solution and let us know if you face any issues.

Regards,
 
Indrajith 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon