Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 685

[1.8] How limit dimension of the images in WYSIWYG mode in Sceditor

$
0
0
Ps. This only work with latest version of mybb 1.8 Beta 2 of Github
https://github.com/mybb/mybb/archive/feature.zip

Ps2. If need modification in final version of mybb 1.8 to this work, i will update this tutorial, don´t worry.
Ps3. Plz, not request to me or send PM asking how to add buttons in the editor. I'll just ignore it. Please do not insist.

Image occupies space in the editor. If large image will occupy almost the whole area of the editor and complicating the visualization of that is writing.

To avoid this we can use CSS trick in the WYSIWYG mode.

1 - Edit root/jscripts/sceditor/jquery.sceditor.mybb.css

1.1 - Find

PHP Code:
body {
    
/* Needed for iOS scrolling bug fix */
    
positionrelative;
    
overflowauto;

    
/* Needed so the cursor will be placed at the end of the content
       when the there isn't enought content to fill the full viewport */
    
min-height100%;

    
word-wrap: break-word;



1.2 - Add after

PHP Code:
img {
    
max-height400px;
    
max-width400px;


You can put another size instead of 400px.

Viewing all articles
Browse latest Browse all 685

Trending Articles