AAD Web Team

  • Content Count

  • Joined

  • Last visited

Community Reputation

27 Excellent

About AAD Web Team

  • Rank
    Jr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location
    Hobart, Tasmania, Australia

Recent Profile Visitors

379 profile views
  1. AAD Web Team

    Oh great, thanks for doing that @Robin S!
  2. AAD Web Team

    I've just worked out a possible workaround, and that is to add classes to the styles drop-down in the toolbar. Once they're on there, they're allowed. However, I'm still curious if there's a solution to my query here, because it seems like it should work.
  3. AAD Web Team

    Great tip, thanks, but unfortunately it hasn't made any difference...
  4. I have the following code in my config.js file. All of it works except the 'extraAllowedContent' line. I realise there is an 'Extra allowed content' option within the settings for individual fields (and if I add p(tip) to that it works perfectly), but I was hoping I might be able to set up some global allowed classes. Any ideas why my config.extraAllowedContent = 'p(tip)'; line might not work? CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.uiColor = '#AADC6E'; config.coreStyles_italic = { element: 'i' }; config.disallowedContent = '*{*}'; // All inline styles disallowed config.extraAllowedContent = 'p(tip)'; config.language_list = [ 'la:Latin' ]; }; I can of course use config.allowedContent instead, but then I have to specify each and every allowed element. I was hoping to use the default allowed content and then just add some classes. According to the CKEditor documentation this should be possible, so I'm wondering if ProcessWire is overriding this setting somehow. Or perhaps I haven't done it correctly? Given you helped me with my previous CKEditor question, @Robin S, I'm wondering if you might know the answer? Thanks! Margaret
  5. AAD Web Team

    Oh wow @Robin S, that works perfectly, thanks!
  6. AAD Web Team

    Thanks again for the hook code @ryan - it works perfectly, with just one minor change - we added a question mark to stop the regular expression being greedy. It was replacing everything between the opening of the first style on the page and the closing of the last style of the page. $value = preg_replace('/\bstyle=(["\'])([^\1]+?)\1/i', '', $value, -1, $qty); It's a great workaround until they fix the bug in CKEditor. I'll keep an eye out for the next core update.
  7. AAD Web Team

    Thanks @flydev and @dragan for your suggestions. I forgot to mention in my original post that I did try paste as plain text. While it works well and is a great option in some situations, it's probably a bit of a last resort for us in this instance. As @ryan has pointed out, we don't want our editors to have to remember to do it (or force them to do it), and they'll just get irritated that all their formatting disappears. They don't always paste from Word, but it happens enough for us to have to make it as simple as possible for them (but not too painful for us as the ones who then have to check their pages prior to publishing them). Indeed! I've been using PW for personal sites for a few years now, so when it became evident we needed to change our CMS I introduced it to the rest of the Web Team and then we managed to argue the case for it to be our new CMS! Finally thanks to @ryan for your fantastic advice. I might look into HTML Purifier a little, but that hook code should be enough to get it operating how we need it. I'll give it a try when I'm back at work on Tuesday!
  8. AAD Web Team

    Hi, I've run into a bit of an issue with CKEditor on the pilot ProcessWire site we're currently working on. Ultimately it may prove to be something I need to ask about on the CKEditor pages at GitHub, but I thought I'd try here first in case I'm missing something... The site in question is running PW 3.0.98. In the Body field's settings we have ACF and HTML Purifier turned on. I've told it to retain non-breaking spaces but it's allowed to strip out empty paragraphs and change divs to paragraphs. I've been happily customising the editor, adding and removing buttons, using mystyles.js and config.js to get it to behave exactly how I want it to, but now I've hit a snag... Problem 1: When I click on the 'Paste from Word' button I get a message telling me that the browser doesn't allow it and I should use Ctrl+V (from the little I've read online this is a known issue in CKEditor and is due to browser behaviour). This wouldn't be so bad if it weren't for Problem 2... Problem 2: When I use normal paste (Ctrl+V) and the content has come from Word, it adds in a whole bunch of inline style attributes! Every h1, h2, p etc has style="margin-left:0cm; margin-right:0cm". Yet if I try to type styles such as these, they are stripped out. I can't understand why paste is behaving differently. Is this the expected behaviour? Even after saving/publishing the page, those stubborn pasted styles remain. How does it even know the difference between what I've pasted in and what I've typed in, once the page has been saved? I've looked into the 'pasteFilter' event in the CKEditor documentation and this seems like it could possibly allow a workaround, if I can explicitly allow certain tags during pasting, but I can't figure out if and where I can customise this in ProcessWire. I tried adding the following to config.js as a test, but it didn't make any difference: config.pasteFilter = 'p; a[!href]'; I also tried pasting this code (taken from CKEditor documentation) into mystyles.js (a longshot I know), but that didn't work either - my thinking was I could use this method to strip out those unwanted styles: editor.on( 'paste', function( evt ) { evt.data.dataValue = evt.data.dataValue .replace( /The/gi, 'AHH' ) } ); I'd be curious to know if anyone else here has encountered a similar issue and knows of a workaround/fix! I should also add that I've observed the same behaviour in Firefox, Chrome and IE, and on a separate installation of PW running 3.0.101. Thanks, Margaret (Web Team, Australian Antarctic Division)
  9. AAD Web Team

    Hi! I actually ended up talking to Ryan this morning via email and he very kindly worked on our issue after hours at his end and fixed the problem. As it turned out, it wasn't specifically an issue with our ProDrafts module and product key. It was a combination of a few things, including beta vs stable versions, some 3rd party modules, and some of our config. Luckily it's just our test server, but it's all part of learning the system too I guess! Cheers, Margaret
  10. AAD Web Team

    Hmm, I'm knocking off work in 15 minutes so perhaps don't worry about responding at this stage... Ryan will probably have answered the support request by the time I get into work tomorrow. I'll reply here if he hasn't. Thanks!
  11. Hi, I've put in a support request (as a followup on an existing one) for this but it's nearly 10pm Ryan's time, so I thought I'd ask on here just in case someone can help... Yesterday we purchased ProDrafts, but I couldn't get the key to validate. Every time I hit submit on the module settings screen the key would be removed from the field I entered it in, and then it would complain about the missing value. I put in a support request and Ryan responded last night. It turned out it was because we're behind a proxy/firewall. He gave me a fix to get around that issue - some code to go into admin.php. I put that code in and saved admin.php, but now I can't even get into our admin anymore! (Just to clarify, I took the code back out and saved admin.php but that made no difference. It's definitely not the new code causing the error.) The errors relate to a lack of permission on the ProDrafts module (see attached screenshot). We do have a key, but evidently the code Ryan gave me to add the key in via admin.php isn't taking effect before the error is thrown...? I tried removing the ProDrafts directory from the modules directory, but that hasn't helped. Is there a hook I can put in somewhere to tell it not to load ProDrafts at all, or not check the permissions? Or is there some way to manually uninstall it from the file system? Thanks! Margaret
  12. Sorry to resurrect an older post, but I just had to provide an update. This is Margaret (also known as Margie, the one who started this thread - that's my personal account), as we got the go ahead to replace our current CMS with ProcessWire! This is our new AAD web team account. The web team is comprised of Warwick (web manager), myself (web developer) and Narelle (web developer). AAD = Australian Antarctic Division. We're just getting started at the moment, testing out some modules and so forth, but I expect you'll be seeing some more of us around the forums as we get further into moving all our sites across to ProcessWire!