New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
empy <p> tag gets appended to existing RichtTextTile when inserting new RichTextTile #413
Comments
googling around, I've found a hint in tinyMCE forum: If I look at the has anybody else encountered the same problems and should this be fixed in |
I have not seen this yet, but I am not yet on the latest TinyMCE. Mosaic editor does a lot TinyMCE restarts (killing and creating the editor again), because every DOM change related to the editor used to break it. That something that is special for normal TinyMCE use cases. Mosaic does override some of default Plone TinyMCE settings, so we could disable that setting. Also, because Mosaic uses most of Plone TinyMCE settings, you could try that setting locally without touching code. |
@petschki I remember having this issue, and the problem was with the automatic CSRF protection... when the tile did the AJAX call to get its content, the response would include the I think I solved it by pulling a more recent version of one of mosaic dependencies... I don't remember which one |
@petschki I can confirm that I have done the changes @frapell mentioned into plone.tiles 2.0.0. For a while, I have not been able to do any Mosaic development and therefore did not manage the latest release nor update versions in documentation. (Before that I was managing release towards 2.0.0 but I had never clear conscience to do that, because of various remaining bugs.) |
@datakurre thank you ... plone.tile version is already the latest, but I try to dig down more on this. @frapell thanks for your hint ... the tile response is already without any |
@petschki mmm, then I don't know unfortunately... I do remember also playing with those settings for TinyMCE until I was able to realize that this was the unwanted extra HTML coming from the server... FWIW, I couldn't find any init setting for TinyMCE that wouldn't cause any unwanted side effect somewhere else... I would make sure that the HTML coming from the server is exactly what was saved, just to be sure who's to blame... is it TinyMCE adding garbage? or is there something else? |
@frapell the HTML data coming from the server is OK. I was able to get rid of this behavoir when setting @datakurre though I'm not really sure if this should be fixed there. (btw. I also tried to add a DataConverter adapter to Before wrapping my head more arround this I'd like your oppinion(s) whether this should be fixed when saving/reading the tile data or in the frontend when initializing TinyMCE. |
@petschki Your standardtiles fix gave me a hint what could cause this: https://github.com/plone/plone.app.blocks/blob/master/plone/app/blocks/layoutbehavior.py#L309 Couple of years ago we changed default tile storage to be a single HTML-serialized field. That mimics the original Deco implementation where tile configuration and content was within the layout. Similarly to that, HTML of rich text tile is saved as HTML in that field. Attribute based storage has some benefits over annotation based storage in versioning, multilingual, restapi, etc... The issue is probably that I've been naive enough to enable pretty print for that field. It sounds like it might be that pretty print that is causing extra newlines. If you can confirm that, please, provide fix into plone.app.blocks. I have no idea, why I have not seen this issue myself. Possibly because of using older TinyMCE-version... |
erm ... maybe the circle is closing here with plone/plone.app.blocks#63 ... seems like some similar problems reported from @frapell ? |
When @datakurre mentioned this issue, I remembered that plone.app.blocks issue... However, in that case, there were new lines being added all over the place, and not only at the end... I don't quite remember why I didn't remove the pretty_print. @petschki if you remove that pretty_print, does your issue gets resolved? In this case, you will need to save the tile content again so the data is saved without the pretty_print in the first place... |
I can confirm that this issue gets fixed with this plone/plone.app.blocks#69 |
Update view methods and layouts from LIF/LRF FTI and objects
I have a strange behavior in the mosaic layout editor.
Steps to reproduce:
<p>
tag appended to every existing<p>
tagssee screenshots. can anybody else confirm this behavior?
Versions:
Plone=5.1-latest
plone.app.mosaic=2.1.1
plone.app.standardtiles=2.3.1
The text was updated successfully, but these errors were encountered: