We thought we should share some info about some updates coming to TinyMCE.
The next TinyMCE release will probably be a slight jump in version numbers and have release candidates due to the massive code rewrite on certain parts. I won’t go into details regarding the changes, but it should mean even more flexibility, better performance, smaller codebase (not an easy achievement) and better sync in functionality between browsers. This update is still far away and there might be other updates in the meantime, but just so you know, we are hard at work with continually improving the editor!
On another note, we are looking into moving TinyMCE to Github, we haven’t quite decided it yet, still a lot to learn about Git, but it should mean that it gets easier for external developers to contribute code in the long run.
Also, some addition to the last post, After the Deadline spell checker is also available as a TinyMCE plugin, check their website! It is the best spell checker for TinyMCE hands down. We are looking into talking with Automattic about possibly including it in the base package of TinyMCE (get in touch guys!).
Check out this video of WordPress new spellchecker, it uses AI to not only spellcheck words, but also check your grammar and make suggestion on changes to your text.
It is in by default in the hosted WordPress, but can also be installed in your self-hosted WordPress blog, it replaces the built in spellchecker in TinyMCE.
The spell checker is called “After the Deadline” and is aquired by Automattic, congrats to a great spellchecker.
When developing large JavaScript project you need a way to document the API for the end users of your project. We have been using a Wiki based documentation for the TinyMCE project for a while but it had some drawbacks one of them it that it’s hard to maintain inline documentation and synchronize that with your wiki and it’s also very tricky update the wiki documentation if refactor your API then you need to change lots of referring links and a wiki doesn’t handle that in a elegant way.
So we started to look for existing documentation generation tools for JavaScript and there are a few out there but they all had drawbacks. For example YUIDoc was written in Python and our build process uses Java so mixing these together wasn’t really ideal. We also looked at JsDoc Toolkit but it tries to be smart and parse the JS code and since it’s such a dynamic language it mostly fails. There is also the Ext API documentation but I think their tool is closed and written in PHP so we couldn’t use that. And none of these wouldn’t handle all the things we use in the TinyMCE project it was always something that couldn’t be documented properly.
Since we didn’t find any existing tool that matched our needs we decided to develop our own. We developed a new documentation tool called Moxiedoc and it’s part of the JS Build Tools project that we are using for all our JS development. This documentation tool will only parse the JavaDoc style comments so it will not try to figure out what your logic is doing. The comments will generate an XML structure this structure will then be processed to HTML files using XSLT templates. It will also generate an intellisense JS stub file for usage in Visual Studio.
Here is a example of how the documentation might look for a class in a project:
The intellisense generator for Visual Studio enables you to auto complete all classes, methods and properties within your JS project.
So if you want to play with it you can find the Moxiedoc ant tasks and other tools in JS Build Tools package. Feedback to this project is very welcome since it’s our first release there is probably lots of things that could be added in the future.
Before the summer we added a new jQuery plugin and a special jQuery build for TinyMCE but we haven’t displayed or documented until now. The new jQuery plugin enables you to more easily interact with TinyMCE using the standard jQuery functions. This improves compatibility with other jQuery plugins such as validators and we think this is a must have if you use jQuery and TinyMCE together.
The jQuery plugin also adds a special tinymce function that enables you to initialize editors and get the editor instance by using selectors. This function will also enable you to lazy load the core script when it’s needed this is useful where you have a global script in a CMS or site and you want to load and apply TinyMCE only to specific pages and textareas. The plugin also adds a tinymce pseudo selector so that you can select only the textareas that got converted.
Here is an example of lazy loading TinyMCE only for textareas with a specific tinymce class.
// Initializes all textareas with the tinymce class
$().ready(function() {
$('textarea.tinymce').tinymce({
script_urlĀ : '../js/tinymce/jscripts/tiny_mce/tiny_mce.js',
themeĀ : "advanced",
...
});
});
We also made a special jQuery build of TinyMCE this build excludes the Sizzle engine since it’s already in jQuery so it was redundant to have the same logic added twice it also uses the jQuery versions of some functions but currently only some of the basic ones. Stefan Petre contributed some logic for this jQuery adapter however these patches wasn’t introduced in this first release due to some compatibility issues. Also we don’t want to replace to much logic since it isn’t a major gain in size and it doubles the testing time and possible bugs.
It’s also important to say that we have plans for similar adapters and packages for other common libraries but our time and also our knowledge of these are limited so if someone is willing to help out please let us know. We would also be interested in your feedback regarding the jQuery plugin might be things we should improve.
Another thing that’s important is that TinyMCE will remain library independent so even if we release this special jQuery version the main build still works without jQuery and can be used with any library out there.
You can read more about the specifics of the jQuery plugin at the jQuery plugin reference page in the Wiki. The jQuery version and it’s plugin can be found at the download page.
We had some wicked weather here in Sweden this weekend, lets hope it keeps up like this.
Haven’t been a lot of activity here on the blog the last few weeks, we are currently busy with a few huge projects that we need to finish before the summer vacation times. Speaking of vacation, during July our offices are closed, we will respond to emails and moderate the forum as much as possible, but don’t expect a quick answer.
The nominations for “Best Project” in SourceForge community awards are closed, the finalists will be announced on the 22nd, then we will need your help again with votes!
We host most of our stuff ourselves, the TinyMCE website has been hopping along on a 2mbit connection for some time now and has been working fine even though we ship around 70 to 90 GB of data each month from just the TinyMCE website. For some time now we noticed slowdowns on peak hours, but now the connection is upgraded and should run more smooth.
Spocke is still monitoring the reports on bugs/requests regarding the new paste plugin, seems to be working quite well. Keep using Sourceforge to submit bug reports.
We recently introduced the new Sizzle CSS selector engine to the TinyMCE core. But I guess we haven’t explained much what it really means for the users of TinyMCE.
The Sizzle engine enables you to use CSS level 3 expressions when developing plugins and integration logic. For example you can select all paragraphs that matches a specific class or all parent elements matching a specific pattern. We used to have a custom CSS level 1 engine in previous releases but maintaining it was moving us out of focus for the core development of the actual product.
Anyway here are some examples on how to use the Sizzle engine trough the TinyMCE DOM API:
// Will select all paragraphs with the someclass and with the someattr
var nodes = tinyMCE.activeEditor.dom.select('p.someclass[someattr=somevalue]');
// Will select all parent p and div elements of the specified element
var nodes = tinyMCE.activeEditor.dom.getParents('p,div', someElm);
// Or check if a specific element matches the expression
if (tinyMCE.activeEditor.dom.is(someElement, 'p.someclass'))
alert('Match.');
A complete reference of the selector patterns you can use can be found on the Sizzle documentation page.
The current version of TinyMCE has some issues with focus on IE 8 this will be addressed in the upcoming release. There has also been some rendering quirks in this new browser version. But it has otherwise not been any reports of IE 8 specific issues. It’s just a bummer that this browser is still so far behind when it comes to web standards.
TinyMCE has basically two types of code IE specific and W3C specific it’s a shame that even with this latest version it doesn’t have some of the core features other browser has. But I must say that IE is a very stable platform when it comes to it’s contentEditable support the things that work works extremely well compared to other browsers. IE is just old it’s not poorly written.
We recently merged the paste2 google code project into the TinyMCE trunk. We have been working hard on this new plugin since we think one of the most common tasks a end user does is pasting contents from standard office applications like Microsoft Word. The default HTML contents you get from Word is a total mess, some speculate that it is in this format to throw other browser vendors of track so they came up will all kinds of junk to beat Netscape and that junk is still in there.
Anyway, this new plugin makes it possible to auto detect word contents on normal Ctrl+V paste operations on all browsers. This means that you don’t need to use the old “paste from word” button in the toolbar. This button was hard to use for novice users and easy to miss.
This plugin uses lots of odd tricks to grab the HTML from the clipboard some of these tricks will be removed in the future when the browsers implement a proper way of dealing with the clipboard. There is a HTML 5 specification on how this should work and the Gecko and WebKit engines are pretty close to a good implementation of these specs.
We will release a new version of TinyMCE later this week. We just need to test it some more and especially the new paste plugin.
Spocke has been working hard trying to solve the issue with pasting in various browsers, cleaning up MS Office junk etc. The result is that the new paste plugin is now included in the SVN trunk and will be released with the next TinyMCE version sometime very soon.
On other news, Microsoft has implemented TinyMCE in their many forums, MSDN, Technet, Answers, Expression and the http://social.microsoft.com/Forums.
We continue to listen to the WordPress community (through our friends working with WordPress) and are very happy about the intergration of our editor in this most excellent blog/site engine.
Need more ppl like Andrew Ozz, for other platforms, we can simple not handle integration with every CMS system out there, if you are working on integration with other CMS, feel free to contact us if you need assistance, we will help you out as much as we can.