Closed SorinGabriel02 closed 1 year ago
I had the same issue. So i decided to use an other library to view the html content. So, i had to install react-simple-wysiwyg library. I use Sun editor for input, wysiwyg for view html content.
I tried using react-simple-wysiwyg
but it does not center the photos that I have inserted into the posts. Funny thing is if I click anywhere on the screen besides the SunEditor
elements these tooltips dissapear.
Yes, you are right.
If you save an image file in the center of the component , and then if you want to view it with the SunEditor component,it shows it in the center of the component. There s no problem.
But other html renderers brings the image to the left. I also tried the code below. It also did the same thing.
<div>
<div dangerouslySetInnerHTML={{ __html: htmlContext }} />
</div>
On the other hand, i tried to give a random key to the viewer <SunEditor key={Math.random()} like that, but it also did not work. I also could not solve it, but left aligned images are okey for me.
My fix was adding this CSS inside the container class, were the list of disabled SunEditor
s was.
.sun-editor {
.se-container {
.se-controller {
display: none !important;
}
.se-line-breaker-component {
display: none !important;
}
}
}
Maybe the core suneditor package could address this
The image edit tooltips show in the component even though the component is disabled
Related repository
To Reproduce Have a list of disabled
SunEditor
s that contain images. When the SunEditor components load first, these tooltips show. If I click anywhere else on the page, they dissapear.Expected behavior The tooltips do not show while the editors are disabled
Screenshots
Desktop (please complete the following information):
Additional context