2018-06-20, 05:42 AM
I found a bug that with the widthxheight in the img tag, that the image aspect ratio is wrong when using the global.php max width/height tag.
And images too large for the postbox get malformed aspect with them having the right height but only width is then adjusted which is a rin bug overall.
As I have some super wide images triple monitor screenshots and would like to just use the global css code above and nor tins image size tags.
What's the best way to fix this and remove the widthxheight tags?
most other forum software do not use this tag and as such we don't want it either and want it resized by our own code.
My test thread
Update: I did some reading and I should be able to disallow content by editing the config.js file as Rin is using CKEditor 4.7.
But cannot seem to get it to work using this code.
Official CKEditor docs
Beautified Rin Editor config.js
You can semi fix it by editing the config.js and adding this to the bottom of the file.
This code doesn't auto insert the values into the width and height area and leaves them blank.
My full config.js file in the rin editor is below.
Just replace your file with this one.
As for removing the width and height properties in the image box I am still figuring that out.
If you can figure that next part out let us know,
#posts_container img {
max-width: 640px;
max-height: 640px;
}
And images too large for the postbox get malformed aspect with them having the right height but only width is then adjusted which is a rin bug overall.
As I have some super wide images triple monitor screenshots and would like to just use the global css code above and nor tins image size tags.
What's the best way to fix this and remove the widthxheight tags?
most other forum software do not use this tag and as such we don't want it either and want it resized by our own code.
My test thread
Update: I did some reading and I should be able to disallow content by editing the config.js file as Rin is using CKEditor 4.7.
But cannot seem to get it to work using this code.
Official CKEditor docs
config.disallowedContent = 'img{width,height}';
Beautified Rin Editor config.js
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function(a) {
(CKEDITOR.env.mobile || CKEDITOR.env.iOS) && parseInt(rinmobsms) && (rinstartupmode = "source");
a.toolbarGroups = [{
name: "basicstyles"
}, {
name: "align"
}, {
name: "styles"
}, {
name: "colors",
groups: ["colors", "cleanup"]
}, {
name: "insert"
}, {
name: "list"
}, {
name: "blocks",
groups: ["blocks", "clipboard"]
}, {
name: "extra",
groups: ["extra", "extradesc"]
}, {
name: "undo"
}, {
name: "document",
groups: ["tools", "mode"]
}];
a.language = rinlanguage;
a.removePlugins = rinautosave;
a.removeButtons = "Cut,Copy,Paste,Anchor,BGColor,indent," +
rinrmvbut + "";
a.removeDialogTabs = "link:advanced";
a.height = rinheight;
a.fontSize_sizes = "xx-small;x-small;small;medium;large;x-large;xx-large";
a.smiley_images = dropdownsmiliesurl.concat(dropdownsmiliesurlmore);
a.smiley_descriptions = dropdownsmiliesname.concat(dropdownsmiliesnamemore);
a.smiley_name = dropdownsmiliesdes.concat(dropdownsmiliesdesmore);
a.smiley_path = smileydirectory;
a.smiley_sc = rinsmileysc;
a.autosave_saveDetectionSelectors = 'input[name*\x3d"submit"],input[name*\x3d"savedraft"],input[id*\x3d"quick_reply_submit"],input[name*\x3d"previewpost"]';
a.autosave_message = rinautosavemsg;
a.startupMode = rinstartupmode;
a.imgurClientId = rinimgur;
a.disableNativeSpellChecker = !1;
a.skin = rinskin;
};
You can semi fix it by editing the config.js and adding this to the bottom of the file.
This code doesn't auto insert the values into the width and height area and leaves them blank.
a.image_prefillDimensions = false;
My full config.js file in the rin editor is below.
Just replace your file with this one.
As for removing the width and height properties in the image box I am still figuring that out.
If you can figure that next part out let us know,
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function(a) {
(CKEDITOR.env.mobile || CKEDITOR.env.iOS) && parseInt(rinmobsms) && (rinstartupmode = "source");
a.toolbarGroups = [{
name: "basicstyles"
}, {
name: "align"
}, {
name: "styles"
}, {
name: "colors",
groups: ["colors", "cleanup"]
}, {
name: "insert"
}, {
name: "list"
}, {
name: "blocks",
groups: ["blocks", "clipboard"]
}, {
name: "extra",
groups: ["extra", "extradesc"]
}, {
name: "undo"
}, {
name: "document",
groups: ["tools", "mode"]
}];
a.language = rinlanguage;
a.removePlugins = rinautosave;
a.removeButtons = "Cut,Copy,Paste,Anchor,BGColor,indent," +
rinrmvbut + "";
a.removeDialogTabs = "link:advanced";
a.height = rinheight;
a.fontSize_sizes = "xx-small;x-small;small;medium;large;x-large;xx-large";
a.smiley_images = dropdownsmiliesurl.concat(dropdownsmiliesurlmore);
a.smiley_descriptions = dropdownsmiliesname.concat(dropdownsmiliesnamemore);
a.smiley_name = dropdownsmiliesdes.concat(dropdownsmiliesdesmore);
a.smiley_path = smileydirectory;
a.smiley_sc = rinsmileysc;
a.autosave_saveDetectionSelectors = 'input[name*\x3d"submit"],input[name*\x3d"savedraft"],input[id*\x3d"quick_reply_submit"],input[name*\x3d"previewpost"]';
a.autosave_message = rinautosavemsg;
a.startupMode = rinstartupmode;
a.imgurClientId = rinimgur;
a.disableNativeSpellChecker = !1;
a.skin = rinskin;
a.image_prefillDimensions = false;
};