TinyMCE 4 and XH 1.7.1
Re: TinyMCE 4 and XH 1.7.1
@aligning images
viewtopic.php?f=16&t=15336#p72523
The principle is:
1. add classes img.left, img.right (or whatever desired for styling images) into your stylesheet
2. add it to desired tinyMCE inits.
viewtopic.php?f=16&t=15336#p72523
The principle is:
1. add classes img.left, img.right (or whatever desired for styling images) into your stylesheet
2. add it to desired tinyMCE inits.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: TinyMCE 4 and XH 1.7.1
Yep, image configuration is severely restricted in the free versions of TinyMCE 4. You can still add the respective attributes in the source code mode of the editor. Firstly, you have to prepare the init_*.js that is used; search for extended_valid_elements, and add ,img[*] to its value, e.g.kurtm wrote: ↑Wed Aug 14, 2019 6:35 amI recently tried to add an image with advanced functions for mouse-over/mouse-out with a second image, but TinyMCE4 doesn't support this function. There were other useful functions such as image alignment which also seem to have disappeared. In looking at the TinyMCE plugins, there is no replacement for 'advimage'.
Code: Select all
extended_valid_elements: 'span[*],img[*]'
Then you can edit the HTML manually, like so:
Code: Select all
<img src="./userfiles/images/image.jpg" onmouseover="this.src='./userfiles/images/mouseover.jpg'" onmouseout="this.src='./userfiles/images/image.jpg'" alt="" width="640" height="480">
Christoph M. Becker – Plugins for CMSimple_XH
Re: TinyMCE 4 and XH 1.7.1
Many thanks for the feedback.
Yes, using HTML with CSS is obviously simple, but for my users, who aren't HTML/CSS capable and who I get to maintain their own content, this is not an option. I use CMSimple because after I set up their initial site, they do their own maintenance which with WYSIWYG is easy, especially if they know MS Word. I have tried to stay away from WP as it's more that my users need.
I will look into adding the init_.js script change that you recommend when I have a little more time. For the moment I'm trying to move to better, more responsive templates and later releases of CMS.
Have fun!
Kurt
Yes, using HTML with CSS is obviously simple, but for my users, who aren't HTML/CSS capable and who I get to maintain their own content, this is not an option. I use CMSimple because after I set up their initial site, they do their own maintenance which with WYSIWYG is easy, especially if they know MS Word. I have tried to stay away from WP as it's more that my users need.
I will look into adding the init_.js script change that you recommend when I have a little more time. For the moment I'm trying to move to better, more responsive templates and later releases of CMS.
Have fun!
Kurt
Re: TinyMCE 4 and XH 1.7.1
Okay -
I just searched tinymce4/inits for init_*.js files (full, menu, imagetools,minimal, etc...) but couldn't find the code for extended_valid_elements in any of them. Maybe I'm looking in the wrong place.
Cheers.
I just searched tinymce4/inits for init_*.js files (full, menu, imagetools,minimal, etc...) but couldn't find the code for extended_valid_elements in any of them. Maybe I'm looking in the wrong place.
Cheers.
Re: TinyMCE 4 and XH 1.7.1
So, possibly a way to continue using advimage of TinyMCE would be the following combination (in TinyMCE 4 the advimage plugin is no longer included):
TinyMCE 3 (included in CMSimple_XH 1.6.10) and hi_kcfinder 3.0.0beta1 as XH Filemanger replacement (to be activated under Settings > Configuration > FILEBROWSER insert: hi_kcfinder).
The administration menu of TinYMCE 3 works under XH 1.7.2 only with the custom admin.php i already sent you. Also hi_kcfinder needs a change in autoload.php to work with PHP 7.2.0, see here.
Disadvantage: Fontawesome cannot be used with TinyMCE 3 (so far, maybe somebody knows a solution)
TinyMCE 3 (included in CMSimple_XH 1.6.10) and hi_kcfinder 3.0.0beta1 as XH Filemanger replacement (to be activated under Settings > Configuration > FILEBROWSER insert: hi_kcfinder).
The administration menu of TinYMCE 3 works under XH 1.7.2 only with the custom admin.php i already sent you. Also hi_kcfinder needs a change in autoload.php to work with PHP 7.2.0, see here.
Disadvantage: Fontawesome cannot be used with TinyMCE 3 (so far, maybe somebody knows a solution)
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“ Ludwig's XH-Templates for MultiPage & OnePage
Re: TinyMCE 4 and XH 1.7.1
Many thanks, I'll give it a shot.
Re: TinyMCE 4 and XH 1.7.1
I looked for a download site for hi_kcfinder but found the site was in "maintenance mode". So I'll look again later.
Re: TinyMCE 4 and XH 1.7.1
Thanks Holger, much appreciated.
Re: TinyMCE 4 and XH 1.7.1
Hmm, even TinyMCE 4 is unsupported for quite a while now, so I wouldn't go back to TinyMCE 3.lck wrote: ↑Tue Aug 20, 2019 3:51 pmSo, possibly a way to continue using advimage of TinyMCE would be the following combination (in TinyMCE 4 the advimage plugin is no longer included):
TinyMCE 3 (included in CMSimple_XH 1.6.10) and hi_kcfinder 3.0.0beta1 as XH Filemanger replacement (to be activated under Settings > Configuration > FILEBROWSER insert: hi_kcfinder).
I see. An option could be to insert the following script at the end of your template.htm (immediately before the closing </body>):
Code: Select all
<script>
(function () {
var hoverimages = document.getElementsByClassName("hoverimage");
var i;
for (i = 0; i < hoverimages.length; ++i) {
hoverimages[i].onmouseover = function () {
this.setAttribute("data-orig-src", this.src);
this.src = this.src.replace(/\.[^.]+/, "-hover$&");
};
hoverimages[i].onmouseout = function () {
this.src = this.getAttribute("data-orig-src");
}
}
}());
</script>
Christoph M. Becker – Plugins for CMSimple_XH