eugenevdm Posted August 9, 2018 Share Posted August 9, 2018 The default font size for TinyMCE is too small. Every Knowledgebase article I create looks wrong and I have to revert to saving, and then previewing the page. I would like my TinyMCE font size to match the actual page. Multiple articles and post about this issue exists on this community but it appears between WHMCS 6.x and 7.x things changed. For now if someone can help me find the tinyMCE.init() function I can follow the official instructions for changing the default font size here:https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@content_css/ Link to comment Share on other sites More sharing options...
brian! Posted August 9, 2018 Share Posted August 9, 2018 1 hour ago, eugenevdm said: For now if someone can help me find the tinyMCE.init() function in the latest versions, WHMCS uses v4.7 of TinyMCE, so a v3 solution is unlikely to be relevant... you may need to look at editing the skin or theme. (assets/js/tinymce) Link to comment Share on other sites More sharing options...
yggdrasil Posted August 9, 2018 Share Posted August 9, 2018 Yes this is also killing me and I just didn't found time yet to increase this without affecting the published articles. I have to zoom heavily and go full screen while editing articles. The font is tiny on the admin side. Link to comment Share on other sites More sharing options...
eugenevdm Posted August 10, 2018 Author Share Posted August 10, 2018 @Brian Thanks for trying to answer the question. I find your answers a bit vague, even a bit rushed. Almost like you want to get some score. You did the same thing here on this post: Have you ever actually solved this problem? It really would be better if you had an actual solution instead of just hinting what the problem might be. #JustSaying Thanks anyway, this highly annoying, irritating, and undocumented problem lingers. Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 10, 2018 Share Posted August 10, 2018 The TinyMCE init is set in a encoded class. I'm not aware of any designed capabilities to allow you to override its settings. 1 Link to comment Share on other sites More sharing options...
brian! Posted August 10, 2018 Share Posted August 10, 2018 3 hours ago, eugenevdm said: I find your answers a bit vague, even a bit rushed. some are - some aren't... depends on how detailed I think the answer needs to be for the OP, how much time I have available to spend on it and other external commitments.... lest we forget that I don't work for WHMCS; I am not paid (or under any obligation) to answer questions and so it's my own time that i'm spending replying to these threads - often replying can take far longer than finding the solution to an issue... also, paid dev work, my own hosting businesses and other things take precedence over this place. I did do a file search of v7.6 to find any mentions of what you asked about - there were none, but there were in v6.... and checking TinyMCE in the admin area showed it was using v4. besides - your question was basically "where is this file..?" - the answer is it's not in an open file in v7.6, and i've no way of knowing if it's in an encrypted file. 3 hours ago, eugenevdm said: Almost like you want to get some score. I couldn't care less about that - neg rep me if you feel like it.... i've received points for incredibly short simple answers, and nothing for long detailed explanations... so i've no idea if any threads I reply in are going to get thanked - nor do I do it for that reason... while it's nice to be thanked, i'd take more personal pleasure in knowing that i've helped someone keep their online business going, or improved it in some way. 3 hours ago, eugenevdm said: you did the same thing here on this post I don't deny it - I gave the OP in that thread somewhere to look for a possible solution to his issue... I did the same to you suggesting that your solution wouldn't work and (effectively) telling you to read the TinyMCE v4 docs on skins and themes for guidance... your above link is from the v3 docs, so you've already been there to find that... it's then not a huge leap to read the v4 docs instead and learn about skins and themes. i'm not sat here knowing the answer but intentionally not giving it to you... I looked into it quickly, pointed you in what I think is the possible right direction and then left it to you to figure out the rest... 3 hours ago, eugenevdm said: Have you ever actually solved this problem? i've never actually tried to. 😀 I don't use TinyMCE so it's not an issue that i'll ever run into. 3 hours ago, eugenevdm said: It really would be better if you had an actual solution instead of just hinting what the problem might be. #JustSaying I agree - but if I don't know the actual solution (otherwise I would have shared it!), what you do you expect me to do? read the v4 docs for you... find the solution... get that solution to work in WHMCS... thoroughly test it and then spend time explaining the answer in a post... that could be 10 mins or many hours - if I was doing all that on a regular basis, just in the hope of a receiving a worthless point, then that would be incredibly sad. now perhaps if the topic intrigued me, i'd spend time on it - but this genuinely doesn't... the days when i'm going to waste time on undocumented WHMCS features that don't interest me are well over! therefore, the best I could do is tell you where to look for the answer... btw - should I delay working on paid projects just to resolve this for you?? #RealityCheck 2 Link to comment Share on other sites More sharing options...
bear Posted August 10, 2018 Share Posted August 10, 2018 1 hour ago, WHMCS Nate said: The TinyMCE init is set in a encoded class. I'm not aware of any designed capabilities to allow you to override its settings. As TinyMCE is not developed by WHMCS, and has no bearing on the operation of the system's core as near as I can tell....why is it encoded? Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 10, 2018 Share Posted August 10, 2018 Hi Bear, TinyMCE is not encoded, however to use TinyMCE you need to invoke the init method of the TinyMCE class with all of the relevant setup options. My comment was that the code which generates the JS to call the init method is within a class and that class is encoded. So if you want to change what parameters are provided to the TinyMCE init function, I'm not aware of a designed / intentional way to do that. I don't want to comment to much on possible unsupported workarounds at this time, I really haven't spent a lot of time investigating it and don't have the time to do so in the near future. Hope that clears my statement up. Nate Link to comment Share on other sites More sharing options...
yggdrasil Posted August 10, 2018 Share Posted August 10, 2018 (edited) 5 hours ago, WHMCS Nate said: Hi Bear, TinyMCE is not encoded, however to use TinyMCE you need to invoke the init method of the TinyMCE class with all of the relevant setup options. My comment was that the code which generates the JS to call the init method is within a class and that class is encoded. So if you want to change what parameters are provided to the TinyMCE init function, I'm not aware of a designed / intentional way to do that. I don't want to comment to much on possible unsupported workarounds at this time, I really haven't spent a lot of time investigating it and don't have the time to do so in the near future. Hope that clears my statement up. Nate I think I wrote a very long rant in another post about this Nate. WHMCS should not be encoding software from third parties. Neither they should encode classes and functions which someone needs to have available in order to modify public GUI functions. TinyMCE is a GUI interface, so all functions and code related to it should not be encoded and customer accessible. This has nothing to do with core WHMCS functions, its just someone that wants to change how he interacts visually with the interface. I hope someone at WHMCS starts to realize they are a bit happy trigger lately with IonCube obfuscation which is giving me and other customers troubles lately with more things moved behind a dark box. Please someone at WHMCS for version 8, make a clear separation of the core licensing functions and all the public output data and GUI functions. Feel free to keep encoding the first ones but please don't keep mixing the files an encode GUI stuff, intentionally or by mistake. And please put back functions to the templates that where moved to an encoded file on newer releases. Some PHP code should be user accessible. Edited August 10, 2018 by yggdrasil 1 Link to comment Share on other sites More sharing options...
bear Posted August 10, 2018 Share Posted August 10, 2018 Exactly right, I'd say. I've always disliked the tiny font in the editor when trying to send emails to clients (for example). Without being able to make that font larger, I'm personally more prone to including typos I just don't notice. There's far more to it than that, but damn, guys....time to allow us just a tiny bit of control that doesn't require feature requests or a multitude of hooks or what have you. Mercy, please. Protecting your code is fine. Protecting EVERYONE'S code is not. 2 Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 11, 2018 Share Posted August 11, 2018 Ok, so we are totally clear: We do not encode TinyMCE full stop. The suggestion that we do is a misreading of the conversation above it. Bear I think it would be helpful for future readers of the thread who miss that while scanning if you'd acknowledge that WHMCS does not encode TinyMCE. I think there have been some valid concerns raised about a desire to customize how TinyMCE is initialized and used within the product. I'll be discussing them internally and am also happy to see a feature request that shows how many people want to customize this and what is relevant there. I would let you know that I recently worked a case to restore the fontsize and fontselect buttons back to the TinyMCE editor and I expect that to be part of 7.6.1-release.1 when it comes out. That should address the initial immediate need of @eugenevdm in this thread. My goal in replying to this thread was to provide a quick answer to a very specific question: is there a way to customize what arguments are passed to TinyMCE's init function by WHCMS? I see the broader conversation about what we encode and what we don't, I understand your concerns and appreciate you sharing them here and in other venues. I don't make that call, just like I don't make the call on what features we work on. Hope that helps, Nate Link to comment Share on other sites More sharing options...
bear Posted August 11, 2018 Share Posted August 11, 2018 9 minutes ago, WHMCS Nate said: We do not encode TinyMCE full stop. The suggestion that we do is a misreading of the conversation above it. Bear I think it would be helpful for future readers of the thread who miss that while scanning if you'd acknowledge that WHMCS does not encode TinyMCE. If they miss you clarifying, they'd likely miss me as well, as they're more likely to read your words than just some community member. All I need is some of my choice back. If you *allow* us to manage the display font size in that, great. Every choice that's removed from the interface and operation is another "why do I stick with this product, or what sort of coding kludge do I need to create here?" question nagging at us. Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 11, 2018 Share Posted August 11, 2018 Bear, my concern was that your reply after I clarified might lead someone else to think we are encoding TinyMCE. 13 hours ago, bear said: Protecting your code is fine. Protecting EVERYONE'S code is not. Is that you don't acknowledge that in this case we are not protecting code we didn't write. I agree with your statement in general, respecting licenses is important to me. If you find a place where we are encoding someone else's code, that is something that is important to me/us to address quickly. TinyMCE introduced a new option to allow you to set h1,h2, css attributes in your articles that when displayed should use the client's CSS for those operations. I think using those is better then allowing the customer to pick font families and font sizes outside of the block content stuff more often then not leads to unexpected behavior for users not familiar with html. Once it got out we got feedback that it was really important and responded accordingly. I also totally understand how frustrating it is when you want to change something and can't make it fit exactly how it works best for you. I also know that every configurable thing we introduce adds more cyclomatic complexity, more chance of bugs, more developer work, and longer testing cycles. It works counter to adding other new features people want. Balance those competing concerns is one of the challenges of writing software. Link to comment Share on other sites More sharing options...
bear Posted August 11, 2018 Share Posted August 11, 2018 1 hour ago, WHMCS Nate said: Bear, my concern was that your reply after I clarified might lead someone else to think we are encoding TinyMCE. Is that you don't acknowledge that in this case we are not protecting code we didn't write. TinyMCE introduced a new option to allow you to set h1,h2, css attributes in your articles that when displayed should use the client's CSS for those operations. I think using those is better then allowing the customer to pick font families and font sizes outside of the block content stuff more often then not leads to unexpected behavior for users not familiar with html. Once it got out we got feedback that it was really important and responded accordingly. I also totally understand how frustrating it is when you want to change something and can't make it fit exactly how it works best for you. I also know that every configurable thing we introduce adds more cyclomatic complexity Fair enough about tinyMCE mostly being untouched by encoding, but not giving us any access to change display fonts and the like is frustrating. MS did things like this with Windows 10, removing choice, and that's one of the reasons why I'm not using it. And it seems you're equating the ability to change display with the end user instead of the admin of the site. If a visitor/client wants to view things with their own fonts, that's on them, and their choice. I have no control over that, even if it ruins the look. When it comes to the ability of an admin to see things the way *they* want, that should be a choice I make, not WHMCS trying to keep me from messing up *their* layout. That is, if I'm reading your comment correctly. Link to comment Share on other sites More sharing options...
WHMCS Nate Posted August 11, 2018 Share Posted August 11, 2018 Bear, Fair enough about your concerns and frustrations. I personally use GNOME instead of KDE because I want my interface to be opinionated and consistent and I don't want to have to customize everything. I don't think we will really succeed in talking about it much more. I don't make the calls about what gets encoded and not encoded in WHMCS. I hear where you and other folks I respect in this thread are coming from and will make sure that view is represented and discussed when those conversations happen. Are you coming to cPanel conference this year? If so I'd be happy to buy you a beer and talk face to face about this or anything else you'd like - same goes for anyone else in this thread. I'm going to stop following this thread and won't be replying again. Nate Link to comment Share on other sites More sharing options...
yggdrasil Posted August 11, 2018 Share Posted August 11, 2018 5 hours ago, bear said: Fair enough about tinyMCE mostly being untouched by encoding, but not giving us any access to change display fonts and the like is frustrating. MS did things like this with Windows 10, removing choice, and that's one of the reasons why I'm not using it. And it seems you're equating the ability to change display with the end user instead of the admin of the site. If a visitor/client wants to view things with their own fonts, that's on them, and their choice. I have no control over that, even if it ruins the look. When it comes to the ability of an admin to see things the way *they* want, that should be a choice I make, not WHMCS trying to keep me from messing up *their* layout. That is, if I'm reading your comment correctly. Well Nate comment is a bit misleading. The poster here asked where the init files are and Nate said twice now they are behind an encoded class. He then said tinyMCE is not encoded... The init configuration files are part of tinyMCE, those are the most important files and if we don't have access to that config we cannot change anything, which is the reason we have this post. If they encode even 1 file from an open source project, you are still encoding open source. I understand this can be a mistake but the fact they encoded the most important file that calls tinyMCE configuration is about taking control away from customers to make changes. So sure, tinyMCE as a whole is not encoded, but the configuration files are !!! This is like leasing me a car, charging me but not giving me the key. Then telling me the car is open and I'm free to drive it. This is exactly what they did here. He said tinyMCE is not encoded but if I cannot use the key configuration here: https://www.tiny.cloud/docs/configure/ Well, that is encoded in my book. And sure, they could claim here that WHMCS created the configuration file (based on probably tinyMCE examples). This is fine if we are allowed to overwrite it with our own. Which I think is not the case here. Let me put like this. The tinyMCE init files are part of tinyMCE, not WHMCS !!! And those are behind an encoded class and Nate said so. Since those are the most important files to modify the editor, I think we can conclude the core functionality was encoded and not by mistake. This is exactly what I was talking in another post. WHMCS is kidnapping control over software they didn't wrote. Sure, they are shipping those open source files in the vendor library non encoded, but they moved the configuration files out to encoded ioncube files which makes some vendor libraries useless. tinyMCE being one example and I could name many other things that WHMCS encoded which are part of open source projects. If one customers takes WHMCS and breaks the obfuscation they would surely consider this breaking the license agreement but somehow WHMCS things they can encode open source configuration init files and not break those license agreements. Link to comment Share on other sites More sharing options...
yggdrasil Posted August 11, 2018 Share Posted August 11, 2018 (edited) On 8/10/2018 at 11:19 AM, WHMCS Nate said: Hi Bear, TinyMCE is not encoded, however to use TinyMCE you need to invoke the init method of the TinyMCE class with all of the relevant setup options. My comment was that the code which generates the JS to call the init method is within a class and that class is encoded. So if you want to change what parameters are provided to the TinyMCE init function, I'm not aware of a designed / intentional way to do that. I don't want to comment to much on possible unsupported workarounds at this time, I really haven't spent a lot of time investigating it and don't have the time to do so in the near future. Hope that clears my statement up. Nate And Bear is correct. That code comes from the official TinyMCE project. Are you telling me that WHMCS wrote the init and JS files for the tinyMCE open source project? I think the answer here is no and you are using the same examples and code that everyone else does on tinyMCE or the official documentation which they post free and open. Those come and are part of tinyMCE or you can create your own based on their documentation. I'm sorry to tell you this Nate, but taking open source example codes, making a copy and paste operation does not mean you wrote them and now have a license over them. All you are doing is just recreating the same code that is open source. So claiming here WHMCS created those config files is like saying I copied every bit and byte from a software I don't own but since I did that I consider it written by me now. I think we would all agree that is ridiculous. So the class and JS from WHMCS which are encoded and contains open source code should not be encoded. In fact, WHMCS has no right to encode or create any restrictions on third party open source software. Encoding the init class for tinyMCE is exactly that as we cannot modify it anymore like the original open source project is delivered if you download it directly. At this point you are trying to make open code proprietary by not allowing others to modify it which is exactly the whole purpose of open source, re-using code and even creating forks. Its ok to mix open source with your own commercial proprietary code (depending on the license you need to release it back as open...) but you are not allowed to encode that file as a whole anymore. This is exactly why companies like cPanel and many others that rely on open source files for proprietary software (which almost everyone does at this point) don't encode their software as a whole. Why? Its a legal mess and it's a developers nightmare to have code separated (even bad for performance...). Because once you start to mix code its gets very messy just to encode some files and not others and you even need to separate the code if some are encoded. All you need is one single line of some open source code in that file to make it invalid for encoding. If WHMCS is doing this, they are violating the licenses of those softwares. For example tinyMCE has a LGPL license. And they clearly state modifications by end users should be allowed, something which is not allowed here because we have no access to the configuration file. That license states the following: The license allows developers and companies to use and integrate software released under the LGPL into their own (even proprietary) software without being required by the terms of a strong copyleft license to release the source code of their own components. The license only requires software under the LGPL be modifiable by end users via source code availability. For proprietary software, code under the LGPL is usually used in the form of a shared library, so that there is a clear separation between the proprietary and LGPL components. The LGPL is primarily used for software libraries, although it is also used by some stand-alone applications. Edited August 11, 2018 by yggdrasil Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted August 12, 2018 Share Posted August 12, 2018 Hi Everyone, This thread is being locked due to the conversation getting out of hand. Could I please ask all members to review the WHMCS Community Guidelines. Link to comment Share on other sites More sharing options...
Recommended Posts