I can't get Inline working for a Rich Text Editor using a CDN implementation

I'm looking for a little help with setting up a CDN based Rich Text Editor in what should be a very simple setup, but I just can't get it working.  I'm not a 'pro', so apologies if this is a bit basic.


The problem I have at this early stage, is that the RTE sets up ok as a normal RTE, but I want to use an Inline version and when I change the code to suit, it won't show the Floating Toolbar.  I can see a shadowy-blur where it should be, but no Toolbar.



Here's a screen-grab of the 'blur' that appears instead of the Toolbar:

Grab-Syncfusion-RTE-inline-Toolbar-blur.jpg




(I'm using this in a FileMaker Pro file via the web-viewer)


Can anyone tell me where I'm going wrong ... and also, if this code is generally ok?


Here's the basic code so far:


<!DOCTYPE html><html lang="en">

<head>

    <title>Essential JS 2 Rich Text Editor</title>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="Typescript UI Controls">

    <meta name="author" content="Syncfusion">

    <link rel='nofollow' href="index.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-base/styles/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-richtexteditor/styles/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-inputs/styles/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-lists/styles/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-navigations/styles/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-popups/styles/material.css" rel="stylesheet">

     <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-buttons/styles/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/ej2-splitbuttons/styles/material.css" rel="stylesheet">


<script src="https://cdn.syncfusion.com/ej2/24.2.3/dist/ej2.min.js" type="text/javascript"></script>

<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>


</head>

 <script> // Registering Syncfusion license key

            ej.base.registerLicense('xxxxxxxxxxxxxxxxxxxxxxxxxxx');

</script>

<body>


<div id="container">

<div id="defaultRTE" >

<p>

TEST TEST TEST

</p>

</div>

</div>


<script>

var ele = document.getElementById('container'); if(ele){ ele.style.visibility = "visible";}

</script>


<script src="index.js" type="text/javascript">

</script>


     <script>

        // initialize Rich Text Editor component

        var RichTextEditor = new ej.richtexteditor.RichTextEditor({


  inlineMode : {

enable :true,

onSelection: true

 }

        });

        // Render initialized Rich Text Editor

        RichTextEditor.appendTo('#defaultRTE')

    </script>


</body>

</html>




19 Replies

VJ Vinitha Jeyakumar Syncfusion Team February 23, 2024 10:10 AM UTC

Hi Grant Symon,



We have prepared a sample as per your requirement to use Inline Editor with RichTextEditor using CDN link references. Please check the attached sample for your reference.


Code snippet:

<head>
    <script src="https://cdn.syncfusion.com/ej2/24.2.3/dist/ej2.min.js" type="text/javascript"></script>
    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/24.2.3/material.css" rel="stylesheet">

    <link rel='nofollow' href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

  </head>



Regards,

Vinitha


Attachment: RTE_JS_a43440ab.zip


GS Grant Symon February 23, 2024 01:11 PM UTC

Hi Vinitha.

Thank you for your reply and for the code, which is very interesting for me to see, as it helps me understand how I should be doing it.

Unfortunately, it gives me the same result as before.  I'm still getting the blur, as in the screen-grab I posted above. ☹️  On the upside, it shows that I'm not going crazy, as I've tried sooo many variations to try and get it working. 🙂

Do you think the problem could lie with Claris' implementation of FileMaker's web-viewer?



GS Grant Symon February 25, 2024 03:06 PM UTC

Just adding to this with a fix:

I posted a question on the Claris-Community, wondering if the problem may be related to FileMaker’s implementation of its Web-Viewer, however, one of the more advanced members of the community, replied:

_________________________________________

It incorrectly calculates the WebViewer width and sets the max-width of the popup <div> to 0.

Add the following CSS to the <style> node:

            .e-rte-inline-popup{
            max-width: 200px !important;
            }

_________________________________________ 

I can confirm that this fix works.

(N.B. the wimdecorte post too.)

Link to the Claris-Community thread.



VJ Vinitha Jeyakumar Syncfusion Team February 26, 2024 04:49 AM UTC

Hi Grant Symon,



We are glad that your issue has been resolved and thanks for sharing the fix details.


Regards,

Vinitha



GS Grant Symon February 28, 2024 10:48 AM UTC

Hi Vinitha,

I'm coming back to this, as I've discovered that the fix using 'max-width' does NOT work when the cursor is placed in a hyperlink/URL.  So, I still get the 'blur' ... and ... it does it without any Selection.  So just placing the cursor in the link.  It also prevents the Toolbar from loading even when selecting text.

This happens using the Code that you provided in your first reply, with the fix applied and which has onSelection applied too.

Can you suggest a fix for this?


Grab-Syncfusion-RTE-inline-Toolbar-blur-B.jpeg



VJ Vinitha Jeyakumar Syncfusion Team March 1, 2024 10:08 AM UTC

Hi Grant Symon,


When we click on the hyperlinks in the Editor, the link quick toolbar will show instead of inline toolbar. So as per your previous issue and fix, we suspect that the below styles will resolve your current issue with hyperlink. Please try this style and let us know if it resolves the issue.

Code snippet:
 .e-rte-quick-popup  {

 max-width: 200px !important;

}

If still issue persists, please share us with the issue replicating runnable sample to validate further.

Regards,
Vinitha


GS Grant Symon March 1, 2024 12:37 PM UTC

Excellent!

Thank you Vinitha.



VJ Vinitha Jeyakumar Syncfusion Team March 4, 2024 04:42 AM UTC

Hi Grant Symon,



You are welcome.


Regards,

Vinitha



GS Grant Symon March 12, 2024 12:19 PM UTC

I've deleted my post from 11-3-24, because I've had a different result when testing again today.  Hopefully, I'll find out why. 🙂



VJ Vinitha Jeyakumar Syncfusion Team March 12, 2024 12:59 PM UTC

Hi Grant Symon,



Sure, we will wait until we get an update from you.


Regards,

Vinitha



VJ Vinitha Jeyakumar Syncfusion Team May 13, 2024 01:21 PM UTC

Hi Grant Symon,



We have included the fix for the reported issue "Background color toolbar popup got hidden when using inline editor in RichTextEditor" with our Vol 1 SP release V25.2.3. So please upgrade your package to the latest to resolve the issue from your end.


Root Cause:
When initially rendering the Dropdown popup left values are mis-calculated and when the picker is opened for the first time the faulty left position values cause the popup to be shown with improper collision.


Regards,

Vinitha



GS Grant Symon May 14, 2024 03:45 PM UTC

Hi Vinitha,


not sure that it's the same issue, but I think I've mentioned this before.  Either way, it's still happening with v 25.2.3.  (I get around it by having the text-colour and text-highlight buttons towards the left of the Toolbar).




Attachment: GSymonvideograbSyncfusionTextCol_HLightpopups_77a0760.zip



VJ Vinitha Jeyakumar Syncfusion Team May 15, 2024 11:57 AM UTC

Hi Grant Symon,


Sorry for the inconvenience caused,  Due to some technical issue, the fix got reverted. We will include the fix with our upcoming weekly patch release at the end of May 2024

Regards,
Vinitha


GS Grant Symon May 24, 2024 01:15 PM UTC

Hi Vinitha,

perhaps I should start a new thread for this, but since it concerns the Text-Background-Color (highlight) I thought I'd just mention it here:

_______________________

When I copy text out of the RTE, it always has a white-background applied.  You won't see this, unless you paste onto a page that is NOT white.

I've spent quite a while fiddling with this and trying various fixes.  Strangely (or maybe not) if I apply a background colour to the text in the css, it works.  If I then try with an RGBa and set it to 0 transparency, it is ignored.

Best,

Grant



VJ Vinitha Jeyakumar Syncfusion Team May 27, 2024 11:11 AM UTC

Hi Grant Symon,


When we copy and paste the contents into the RichTextEditor, the inline styles will be copied along with the text content from the clipboard data. So that your reported issue occurred. 

However, we have considered this requirement as a feature request to improve copy formatting of text contents within the RichTextEditor. Now you can track the status of the feature in the below feedback link.


The above feature will be implemented in any one of the future volume releases. Generally, we will plan the feature implementation based on the customer request count, feature rank, and wishlist plan. You can upvote the feature request feedback so that it gets support and will be ranked higher for implementation.

Regards,
Vinitha


GS Grant Symon May 28, 2024 08:44 AM UTC

Hi Vinitha,

the issue I'm having is NOT with copying into the RTE... it's with copying 'OUT OF' the RTE.

Whatever I try, it is impossible to copy out of the RTE, without white-text-background being applied unless, a different colour is applied via the RTE 'Background Color' button.  All other attempts, apply a white-text-background.

Regards,

Grant



Attachment: GSymonvideograbSyncfusionTextBGnd.mp4_c7960a66.zip


VJ Vinitha Jeyakumar Syncfusion Team May 30, 2024 04:55 AM UTC

Hi Grant Symon,

Yes, as you said, the issue is with copying out of the RichTextEditor. When copying contents from the Editor, the copied text will be saved to the clipboard data, which is the default browser action. Hence, when we copy some texts from the RichTextEditor, the inline styles will be copied along with the text content in the clipboard data and thus, we have considered this an improvement "Improve copy formatting of text contents within the RichTextEditor".

Regards,
Vinitha


GS Grant Symon May 30, 2024 06:26 AM UTC

Thanks for the clarification Vinitha.



VJ Vinitha Jeyakumar Syncfusion Team May 31, 2024 04:46 AM UTC

Hi Grant Symon,

You are welcome.

Regards,
Vinitha

Loader.
Up arrow icon