[Pushed] max-width and max-height of img of editor not has any effect
#1
Change made here:

https://github.com/mybb/mybb/commit/3e42...ce55f126f3

not has any effect...

Image in editor not scaled...

To this work need put this code below

img {
	max-width: 100%;
	max-height: 100%;
	height: auto;
	width: auto;
}

in /jscripts/sceditor/jquery.sceditor.mybb.css

Why of this i already said here https://github.com/mybb/mybb/pull/965#is...t-49506075

And if need Make style of editor textarea (jquery.sceditor.mybb.css) dependent with theme of editor check this http://community.mybb.com/thread-156662.html



What documentation of sceditor said about style option:

[Image: qT7QX12.png]

http://www.sceditor.com/documentation/options/
Reply
#2
Scaling seems to work for me in the default latest github version, in Chrome at least.

Anyways, I agree that implementing this: http://community.mybb.com/thread-156662.html would be most likely good. One CSS file to load less and full theme editor split in opposite to the current messy 50% for all themes and 50% separated. But that's for 1.8.1.
Reply
#3
@Destroy666

strange i downloaded today of github and tested...
for me not work...

using chrome too...

http://www.dailymotion.com/video/x23biy9_test2_tech

(2014-08-11, 11:49 AM)Destroy666 Wrote: Scaling seems to work for me in the default latest github version, in Chrome at least.

Anyways, I agree that implementing this: http://community.mybb.com/thread-156662.html would be most likely good. One CSS file to load less and full theme editor split in opposite to the current messy 50% for all themes and 50% separated. But that's for 1.8.1.

not reduce file to load...
jquery.sceditor.{$theme['editortheme']} different of {$theme['editortheme']}
Reply
#4
(2014-08-11, 12:06 PM)martec Wrote: not reduce file to load...
jquery.sceditor.{$theme['editortheme']} different of {$theme['editortheme']}

Oops, I partially misunderstood your thread. Well, the 2nd part still applies though - both files should be splitted, otherwise it's a mess.

I'll try to reproduce it again later.
Reply
#5
Same problem in Chrome. Maybe should be added in 1.8
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#6
tested now here... and really not work for me...
Reply
#7
I see, had some uncomitted changes locally. Pushed to github manually as the button doesn't work yet: https://github.com/mybb/mybb/issues/1188
Reply
#8
When the image exceeds the width of the editor, scale the whole photo until the width fits.  Scaling down means the that as the width gets smaller, so does the height, but ratio remains the same. But it is not necessary to make the height fit the editor window. It is normal for editors to have to scroll up and down.
Reply
#9
Lightbulb 
I added the following code to the file jscripts > sceditor > jquery.sceditor.mybb.css and it works for me:

img {
	max-width: 100%;
	height: auto;
}

It is important to not use width: 100% because the image would then always be sized. Even above the actual dimension.
If an aspect ratio correct scaling should be achieved with css it is good to set the width and just let the height be adjusted with height: auto
Reply
#10
@sthag, it has already been fixed and is awaiting merge,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)