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:
(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>
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
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?
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.)
Hi Grant Symon,
We are glad that your issue has been resolved and thanks for sharing the fix details.
Regards,
Vinitha
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?
.e-rte-quick-popup { max-width: 200px !important; } |
Excellent!
Thank you Vinitha.
Hi Grant Symon,
You are welcome.
Regards,
Vinitha
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. 🙂
Hi Grant Symon,
Sure, we will wait until we get an update from you.
Regards,
Vinitha
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.
Regards,
Vinitha
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
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
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
Thanks for the clarification Vinitha.