Closed (outdated)
Project:
TinyMCE
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
18 Apr 2006 at 01:25 UTC
Updated:
14 Jan 2021 at 19:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
m3avrck commentedHi Gordon, I had fixed this earlier, but you're right, it is not working right now. However, your patch is redundant, as this is already being taken care of on line 101. However, for some reason, something in forms API changed so now #resizable isn't being honored. I'm not sure if this has something to do with #after-build or not. But it looks like the problem is how core changed so I'm not sure what we need to change circa line 101 to get it to work. I'll have to do some digging but right now I don't have any more time to look into it.
Comment #2
gordon commentedI saw that and it doesn't do it. If the _tinymce_page_match() (line 94) returns a false, which happens to any textarea that is exclued from the profile, then line 101 doesn't get called to set the resize back to true.
Comment #3
m3avrck commentedGordon, ah yes, very good catch! Thanks, fixed.
Comment #4
Waldemar commentedHm... It seems that now fields are ALWAYS resizable no matter what #resizable is set to...
Comment #5
m3avrck commentedMake sure you set "Enable resizing button:" to false under "Editor Appearance" on the profile page for TinyMCE. This is on by default.
Comment #6
Waldemar commentedThanks for the reply. Yes, ok, but shouldn't I be able to controll it with the #resizable option no matter what the TinyMCE Option is set to when TinyMCE is not controlling a textarea? It took me quite a while to figure out that TinyMCE was the reason for this. I don't see any easy workaround if I want TinyMCE to control certain fields and the textarea to be resizable there, but not use TinyMCE on other pages and get the usual drupal behaviour.
Any ideas?
Comment #7
(not verified) commentedComment #8
RobRoy commentedNow, the textareas that TinyMCE does NOT control that I have set '#resizable' => FALSE have the grippie bar under them still. When I turn of TinyMCE this works as desired. So we need to find out what the set value of the $element's #resizable field is and use that instead of defaulting to TRUE always.
Comment #9
RobRoy commentedI commented out the $element['#resizable'] = TRUE; lines on 101 and 221 to keep the default value and it works as desired (for me at least). What am I missing?
Comment #10
bomarmonk commentedI copied the screen.css from the tinymce installation into my theme's directory. I then set the path for the css to this location (in the tinymce module's settings page). This made the resizeable AJAX text areas work for me.... I'm not sure if this is just a sloppy accident, but I'll keep the behavior for the time being-- otherwise the resizing did not work.
Comment #11
RobRoy commentedThis is still a bug. tinymce_elements() is setting resizable to FALSE to prevent drupal.js from adding a resize bar to the textarea, but this overrides whatever you set #resizable to in your form. We need a way to preserve the orginal element #resizable property and then pass that to tinymce_process_textarea(). Hmmm...but hook_elements() doesn't let you access the element to store this.
Thoughts?
Comment #12
RobRoy commentedOkay, I shifted the behavior to keep the current settings and set #resizable to FALSE if we ARE processing this textarea with TinyMCE. I've tested it and it looks like it's honoring the #resizable property for non-TinyMCE textareas now.
Comment #13
kreynen commentedhttp://drupal.org/node/130305
Comment #14
RobRoy commentedLet's not mark this a duplicate of a summary issue. We need specific issues and this one has been around for a long time. My solution has worked well for me, anyone care to comment?
Comment #15
kreynen commentedI'm not saying that this isn't working, but there are simply too many issues in the queue to figure out what is actually an issue and what has been resolved. I've slogging through these a few at a time for weeks, but today I buckled down during a few of the sessions at OSCMS and started clearing out all the 4.6 issues and sorting the remaining feature requests and conflicts. I've categorized many of the remaining issue in these 3 categories...
Summary of textarea on/off by content type Request
Summary of gzip/compressor Issues
Summary of Width CSS/Resizing Issues
Summary of Filters/HTML cleanup Issues
Summary of Translation Issues
My goal with all of this is make sure there is a clear plan for how these can be implemented with the new JQuery, form based customization approach. I don't want to get the jquery version is out there, only to realize that old issues have resurfaced and can't be corrected in the jquery version.
If your interested in seeing this rolled into TinyMCE, please join the TinyMCE Development Group. There are several issues regarding resizing that aren't solved with the JQuery approach. I haven't looked at this patch yet, but I plan to.
Comment #16
johnalbinI saw Kevin's g.d.o request to fix the #resizable bug and I came up with a patch.
I wish I saw this issue first, as my fix is IDENTICAL to Rob's 4 month old patch for 4.7.x-1.x-dev.
The attached patch is rolled against 5.x-1.x-dev.
Comment #17
DaveNotik commentedDoes this patch address that when resize is turned on in TinyMCE profile, it is redundant because Drupal's default one is there?
Is the way to just have one to turn off TinyMCE's and get Drupal's working?
Does this patch work with 5.1?
Thank you!
--D
Comment #18
johnalbinDave: yes. To all questions. Try it. If it works, report back here.
Not sure why it hasn't already been committed. Kevin has a real life apparently. ;-)
Comment #19
DaveNotik commentedGot the patch to work.
Yes, it removes the Drupal resize, turning on TinyMCE one works.
(A note on the two resize "interfaces". The TinyMCE seems to indicate you can stretch horizontal and vertical, but Drupal one makes more sense since you can only stretch vertical.)
--D
Comment #20
Jomel commentedWith JohnAlbin's patch in #16, none of my textareas are resizeable, even those without TinyMCE (for example because none of the user's Roles match a TinyMCE profile, although they do have access to TinyMCE).
Drupal: 5.1
TinyMCE: $Revision: 1.90.4.16 $ $Date: 2007/02/25 20:02:44 $
Comment #21
Jomel commentedFirstly, I'll be more specific...
Without the patch in #16:
With the patch in #16:
However, I've attached a modified version of JohnAlbin's patch which fixes this, so users with access but no TinyMCE profile setup have their textareas (drupal) resizable as normal.
Disclaimer: I don't have much experience with Drupal or TinyMCE, so someone who knows what they're doing should review the change.
Minor remaining issue (the reason I only put OK above):
If TinyMCE processes a textarea, when rich-text is disabled that textarea won't be (drupal) resizable. This is particularly noticeable if you have TinyMCE default to off. The best approach would be to somehow disable drupal resizable only when TinyMCE actually loads (tinyMCE.addMCEControl) for the textarea (e.g. when the user clicks enable rich-text), and re-enable it if the user clicks disable rich-text (tinyMCE.removeMCEControl).
Comment #22
johnalbinJohn, thanks for reviewing the patch!
“If user's role(s) have access but no TinyMCE profile setup,” then the site admin has mis-configured TinyMCE; which unfortunately is too easy to do and is whole other can of worms. However, you solution is simple, so +1 for including it.
I‘ve opened #140039 regarding the “textareas not resizable if rich-text is disabled” issue.
+1 Patch is RTBC.
Comment #23
m3avrck commentedThanks guys, fixed!
http://drupal.org/cvs?commit=66493
Comment #24
(not verified) commentedComment #25
alex.k@drupal.org commentedSeems like this fix went into 5.x but the 4.7 branch did not get it.
Could you apply the same fix to the 4.7 branch? I'm attaching basically the same patch as in #21 but taken against the 4.7 version.
Thanks!
Comment #26
mupsi