Jump to content

InputfieldTinyMCE update - Help test


Soma
 Share

Recommended Posts

Soma, I also can't get the template to show up, and I have worked out my issues with the server.

I'm reading on the tinymce template page this and wonder about the relative link to the templates_template.js file.

template_templates An array of template objects. Each object specifies the template title, source URL and description. If the source URL is relative it must be relative to the requested page.
Link to comment
Share on other sites

If the source URL is relative it must be relative to the requested page.

Nothing special, either relative or absolute. It can get quite difficult with relative paths and not so flexible.

Make sure you're the paths from the root of the web dir are correct.

Paste the path into the browser and see if the body_templates.js file can be loaded

Try inspecting with chrome tools or firebug if it's failing to load the file

Not sure what else :)

Edit: Also check if you're in a subdir (not web root). Then you would have to adapt the paths in the body_templates.js file with that subdir included. /subdir/site/...

Link to comment
Share on other sites

If you use translations (TinyMCE in any other language than English) it might fail loading plugin and that prevents whole editor to load. Noticed this when trying to load new CodeMagic plugin on core.

Link to comment
Share on other sites

Ahh, no the lang code wasn't there. Now changing it to "de" it doesn't work.

I think best maybe would be to no put codemagic into core TinyMCE like Ryan did. So one can decide to use it and put it in site folder (using this technique here with my update) and if the language for codemagic doesn't exist, one can do/add it.

Link to comment
Share on other sites

I think this implementation is working well. Anyone?

Since Ryan has done some recent changes to the inputfieldTinyMCE and added Codemagic to the core TinyMCE folder, we'll have to first sort this out. I told Ryan it may be best to put Codemagic not in core, since it will be hard to add translation to it this way.

I haven't tested yet if the translation of Third-Party plugin would work with my method here of adding it externally via the field configuration. But this way one could add the necessary [lang].js to it.

Anyway anybody interested in helping out testing/doing?

Link to comment
Share on other sites

I've not tested this thoroughly yet, but to hijack the thread slightly and go back to my earlier request - we don't need to.

I realised the other day that if PW is just made to use the default theme (called "default") then we can just have additional CSS in the admin CSS file to override colours etc instead of my idea to somehow support multiple themes.

So... ignore my previous posts asking about that.

Back on topic, I'll try to test these changes over the weekend if I get time Soma!

Link to comment
Share on other sites

I found that codemagic wouldn't work anywhere other than in TinyMCE's main plugins dir because it has hard references to some TinyMCE file in the parent dir. I know that can be fixed by making a copy of that file it is referencing, but that's not desirable and perhaps could cause bugs elsewhere. I've left codemagic in the TinyMCE code for now, but just not including it in the default TinyMCE config. So if someone wants to add it, they can do so by adding codemagic to their plugins list and and not have to worry about it being overwritten on upgrades. Still, only being able to use it with 3 languages is a shame. I can't believe TinyMCE has no fallback for language support other than a JS error.

The other thing is that codemagic's list of words to translate is pretty short. It wouldn't be hard to add all the translations that TinyMCE supports. Google Translate told me she would help me out with this if I wanted. :)

Link to comment
Share on other sites

  • 1 month later...

Ryan, yeah codemagic has some hard reference that makes it impossible to put it outside :/. Thought there's not much translation that we could add.

I don't know if there might be other third party plugin that does the same.

Regarding the "bramus_cssextras", I would like to have that being able to integrate it without touching the core every update, and I use it in many installations meanwhile.

- Either add it to the core like codemagic plugin.

- or adding my version here from this test version, by adding another config textarea "third plugins". ( I added the module and the js code)

Let me know what you need.

Link to comment
Share on other sites

If it doesn't add any overhead, or interfere with anything existing, I'm cool to add it in the core as one of those things people can choose to optionally turn on. I think if I could see a diff or GitHub pull request that shows me what's different, that's all I'd need.

I still don't really understand the Bramus CSS extras plugin or know how/why/when to use it, otherwise it would already be added. For instance, their "what is bramus css extras?" screen implies that one can't float images without it (which obviously isn't true), among other things. I only get lost in their demo, which seems to cross some uncomfortable boundaries of turning TinyMCE into a styling tool. So I've always been a bit perplexed by the value of this plugin. However, I do understand that it is apparently very useful, as many don't want TinyMCE without it. So if it makes life easier to have it as an optional component in the core, lets add it.

Link to comment
Share on other sites

  • 3 weeks later...

OK, coming back to this :)

Thanks Ryan, I'll pull request the tinymce module and js changes I've done to add a third party config textfield to add plugins from outside the core. Hope you'll find the time to pull it in - :)

bramus_cssextras, mainly it's for fixing the tinymce internal style select, which doesn't work well with nested elements and is cumbersome to deal with. This plugin is context sensitive, as it only enables the style dropdown if you put cursor in an element that has a class specified. Like if you specify p.lead{} in your content.css, it will only be selectable if you select a paragraph. It also provides an solution to an issue where you couldn't add a class to the <ul> element in tinymce, because you can't select it. So if you click inside a ul list, the <li> element is usually selected and classes get appended to the <li> element and not the parent <ul>. Bramus solves this.

WEll I don't know why I'm explaing this the x-time here on the forums :D The website explains it all and the demo works well to demostrate: http://www.bram.us/d...amus_cssextras/ ... The top row "style" is the regular style select. The disabled ".class" and "#id" menu select on the 3rd row is the one from bramus_cssextras. Click inside the list in the text and see the menu gets enabled and only shows classes that can be added to the current selected element. Pretty cool compared to tinymce default style if you ask me. :)

  • Like 1
Link to comment
Share on other sites

Question - Is there a particular reason the TinyMCE is back at 3.4.7 in the current release and not current (3.5.1.1)?

I updated the module to use 3.5.1.1 it on my local install and added codemagic and every thing appears to be fine from my experience over the last couple of days. We build HTML5 sites and I was looking for better support in the editor, thus the update.

Link to comment
Share on other sites

I updated the version to the latest a few months ago. I guess they are doing a good job of making regular updates to TinyMCE. I don't think we can update every time they release a new version just because everything has to inevitably be tested and re-tested every time we upgrade something like that. But I will plan to pull in the latest version when I bring in Soma's Bramus updates into the core (next week or two).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...