Skip to content
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

Text not wrapping in TinyMCE 4.3.3-pl & MODX 2.2.4-pl #94

Open
Marcelli opened this issue Nov 27, 2012 · 4 comments
Open

Text not wrapping in TinyMCE 4.3.3-pl & MODX 2.2.4-pl #94

Marcelli opened this issue Nov 27, 2012 · 4 comments

Comments

@Marcelli
Copy link

Hi, Spittingred!

I posted comments concerning the issue marked as closed (#15). I guess it makes more sense to open a new issue?

Text does not wrap any more in TinyMCE (in Chrome or Firefox, no difference). I can't seem to understand how it appeared. To me it came up entirely unexpectedly, the only change I made was to remove advimage from the plugin list. Then I added it back just in case, but tinyMCE still refuses to wrap the text in the editor. I can't reproduce it, but it is here, very, very annoying.

I have reinstalled tinyMCE, to no avail. Please, help!

Splittingred, looking at the html of the editor, here is what I see within the tinyMCE Iframe:

<body id="tinymce" class="mceContentBody " onload="window.parent.tinyMCE.get('ta').onLoad.dispatch();" contenteditable="true" spellcheck="false" dir="ltr" style="white-space: nowrap; ">...</body>

JS adds "nowrap" here for some reason that I don't get. However, in the system settings, 'tiny.nowrap' is set to 'no', I have never changed this setting.
Can you explain me what is the setting I should change to get "white-space: normal" (apart from modifying the stylesheet)?

Thanks a lot in advance!

@yogoo
Copy link

yogoo commented Jan 30, 2013

There's a bug that's causing text to not be wrapped in the editor when the System Setting 'tinymce.nowrap' has a value equal to 0 written in the DB.

Until it's fixed in the plugin, here's a workaround: remove the value for that key in the DB:

1.- Run the following statement

SELECT * FROM `modx_system_settings` WHERE modx_system_settings.key='tiny.nowrap';

2.- 'value' is expected to be 0
3.- Delete the value --- watch out, do not delete the record or expect the sky to fall on your head
4.- Clear Modx cache from the manager + delete all files in /path/to/modx/core/cache/

TinyMCE should wrap the text again.

@Marcelli
Copy link
Author

Thanks, yogoo.
I found an easy but dirty workaround by changing tinyMCE CSS to force wrapping.
I hope the bug can be fixed sometime. It seems to affect a minority of users, so it must be some conflict between tinyMCE and something else, right?

@yogoo
Copy link

yogoo commented Feb 3, 2013

Hi Marcelli, short answer: nope, it doesn't look to be related to anything outside TinyMCE.

From what I saw so far, there's a bug with boolean properties. It might come from the modx extra or from the editor itself.

The bug occurs once the value of the boolean property was written to the DB by explicitly changing its value via the TinyMCE System Settings. When the plugin is installed, default properties are set but not written to the DB. When the value is changed, it's written to and pulled from the DB. Everything is fine as long as it's set to 1. Things go wrong when it's set to 0.

In your case, my guess is that at some point you did change the value of the property and it got written to the DB.

@bobbwal
Copy link

bobbwal commented Jul 15, 2013

I've just encountered this issue, your fix worked yogoo. Thanks!
MODX 2.2.8-pl
tinymce-4.3.3-pl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants