126

Re: What should we focus on in the future development of TinyMCE

Thank you Spocke I'll read about valid_elements.

Greg.

127

Re: What should we focus on in the future development of TinyMCE

Are you planning to rewrite tinyMCE in jQuery ?
I know it sounds crazy, but with jQuery, you write less and do more.
Do you think the package would be lighter, given the fact that jQuery is getting more and more common, and weight less than 20kb.
I think we would also get rid of many inconsistancies amoung the different browsers/platforms...

128

Re: What should we focus on in the future development of TinyMCE

We have been thinking of reducing the code by using different coding methods. But TinyMCE will not be based on jQuery or any other prototype like library that isn't namespaced properly. YUI is properly namespaced but it will most likely make TinyMCE even larger since that API is big, so it's not an option. smile

Best regards,
Spocke - Main developer of TinyMCE

129

Re: What should we focus on in the future development of TinyMCE

spocke wrote:

But TinyMCE will not be based on jQuery or any other prototype like library that isn't namespaced properly.

This is interesting. What exactly is the problem with jQuery's namespacing?

~ Brice

130

Re: What should we focus on in the future development of TinyMCE

You ask what you should focus on in future releases of TunyMCE. I would say: improve support. I have PAID for support on friday night and I havent heard back from you 24 hours later. Whatever happens, if I ever hear back from you or not, that is already way too long.

Regards,

Theo Richel

131

Re: What should we focus on in the future development of TinyMCE

spocke wrote:

We have been thinking of reducing the code by using different coding methods. But TinyMCE will not be based on jQuery or any other prototype like library that isn't namespaced properly. YUI is properly namespaced but it will most likely make TinyMCE even larger since that API is big, so it's not an option. smile

Maybe you could use Ext.DomQuery from Jack Slocum? This API really rocks!!!

132

Re: What should we focus on in the future development of TinyMCE

Yeah, it really cool. But it's also very big. I've been thinking back and forth about rewriting TinyMCE on top of some Ajax lib. But I came to the conclusion that it's better that TinyMCE is independent of third party libraries so that it won't conflict with other code/javascript on the same page based on other libraries or even other versions of the same library.

It's also makes it more easily for me to maintain when it comes to bugs, patches etc not having to patch or debug some one else's code. It has some major drawbacks to it takes more time to write all parts needed and TinyMCE will not benefit from the community of the other libraries.

Best regards,
Spocke - Main developer of TinyMCE

133

Re: What should we focus on in the future development of TinyMCE

I am switching to TinyMCE  in my own CMS. I am completely satisfied with size and load time, the feature I really need is working “auto_resize” attribute. I would like to offer you an advice:
To get this feature working you simply need to set vertical size of middle cell to 100%. This will allow editor to work in mozillas / opera (and probably other browsers), but not in IE. To get it working in IE a small hack must be done outside the editor. I am (for example) setting the height of cell, containing the control to appropriate size on client side via javascript. This technique works with FCKEditor, I think it will work with TinyMCE as well. The hack is needed for standards compliant mode only, in quirks mode all will work as expected, though quirks is not a solution in most case. If you wish I can send a working piece of code.
Thank you for a great editor!!

134

Re: What should we focus on in the future development of TinyMCE

Sounds interesting, please send us a working example of this feature.

Best regards,
Spocke - Main developer of TinyMCE

135

Re: What should we focus on in the future development of TinyMCE

function GetIEClientHeight()
{
    //IE 6+ in 'standards compliant mode'
    if(document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight;
    //IE 4 compatible
    else if(document.body && document.body.clientHeight) return document.body.clientHeight;
    else return null;
}

function FixIE(Height)
{
    var FixedHeight = GetIEClientHeight();
    if(FixedHeight == null) return;

    FixedHeight -= Height;
    if(FixedHeight < 0) FixedHeight = 0;
   
    document.all['MiddleCell'].style.height = FixedHeight - Height + 'px';
}

where 'MiddleCell' is the cell, witch  contains editor (or something other);
variable ‘Height’ is summary size in pixels of elements above and below MiddleCell plus some additional space, its value is difficult to calculate, but it never changes for particular page.

Function FixIE(…) must be called when page is loaded or resized.

working example: http://www.tambov.gov.ru/Default.aspx?Page=138 (xhtml 1.0 + vertical scaling of table with 3 rows)

136

Re: What should we focus on in the future development of TinyMCE

Hi everybody!

Today I'm working on the help section of my editor (you remember the round blue button with the white questionmark?). Since I've added this symbol as a clickable link on almost every dialogue window to offer "context sensitive" help I thought I might as well share this idea with you all.

Have a look at my simplified InsertImage dialogue:
http://www.felix-riesterer.de/self/insertimage_dialogue.jpg

Clicking the help symbol will call this dialogue window:
http://www.felix-riesterer.de/self/insertimage_help.jpg

I thought you could add this functionality to the mceHelp command... at least that's what I've done.

All I needed to do was to "import" this command into my own plugin to "overwrite" the theme's original mceHelp command functionality. This was easy:

// Handle commands
    switch (command) {
      case 'mceHelp':
        tinyMCE.openWindow({
          file : '../../plugins/pgextra/about.htm',
          width : 650,
          height : 500,
          close_previous : "no"
        }, {
          tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion,
          tinymce_releasedate : tinyMCE.releaseDate,
          startPage : value ? value : 'index.htm', // this shows the table of contents by default
          resizable : "yes",
          inline : "yes"
        });
        return true;
      break;

Of course I've also modified the "about dialogue" to show the "help" tab by default. I've then changed the "/jscripts/about.js" file by modifying this function:

function insertHelpIFrame() {
    // This path is inside my custom plugin folder, but I could imagine to put these files in a more suitable place...
    var startPage = tinyMCE.getWindowArg('startPage');
    var html = '<iframe src="'
        + tinyMCE.baseURL
        /* this might need some thinking - maybe ready-made docs pages for plugins in their own folders
           should get some support here, so that the in-editor documentation could be turned into something
           modular...? */
        + '/plugins/pgextra/docs/'
        + tinyMCE.settings['language'] // for multiple language support
        + '/' + startPage // the very documentation page to load
        + '"></iframe>';

    document.getElementById('iframecontainer').innerHTML = html;

    html = '';
    html += '<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a> ';
    html += '<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a> ';
    html += '<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a> ';

    document.getElementById('buttoncontainer').innerHTML = html;
}

Since many dialogue windows need additional Javascript included I've just added a function at the end of the respective {plugin}/jscripts/extrascript.js file. The mceHelp command can now get called by calling "callHelp()" in the help link (http://tinymce.moxiecode.com/tinymce/jscripts/tiny_mce/themes/advanced/images/help.gif)

function callHelp() {
  var id = tinyMCE.selectedInstance.editorId;
  var startPage = "insert_links.htm";

  tinyMCE.execInstanceCommand(id, "mceHelp", false, startPage);
}

Maybe this is something to consider adding as a regular feature to TinyMCE? I'd also suggest moving the "docs" folder from tiny_mce/themes/{usedtheme}/docs to tiny_mce/docs. I can also imagine to add a docs folder to every plugin to host the HTML file(s) to be displayed inside the help tab in the about dialogue.

Greetings from Germany,

Felix Riesterer.

Last edited by Felix Riesterer (2007-04-17 22:40:04)

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

137

Re: What should we focus on in the future development of TinyMCE

Hi everybody!

I sometimes change my content unwillingly because TinyMCE still keeps my selected content "reachable" although I'm dealing with a dialogue window of some kind.

Just imagine you would like to set a link. You select the portion of text you would like to be clickable and then click the "insert/edit link" button to get the "Insert/Edit Link" dialogue. When the dialogue finally finishes loading I would directly start typing the URL to my link's  destination ... but TinyMCE will change the selected portion of text to what I now type! Although I can't reach the editor itself (I use the inline popup plugin - but that's not the problem here!) I still can change its content by typing away.

I was already looking for some kind of solution to this before, but now I had an idea:

I'd like the TinyMCEPopup to be modified in future versions to provide this automatic focus on an input field in the newly opened dialogue window. My suggestion is to modify TinyMCEPopup's onLoad function like this:

onLoad : function() {
    var dir, i, inputs, textinput, elms, body = document.body;

    if (tinyMCE.getWindowArg('mce_replacevariables', true))
        body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs);

    dir = tinyMCE.selectedInstance.settings['directionality'];
    if (dir == "rtl" && document.forms && document.forms.length > 0) {
        elms = document.forms[0].elements;
        for (i=0; i<elms.length; i++) {
            if ((elms[i].type == "text" || elms[i].type == "textarea") && elms[i].getAttribute("dir") != "ltr")
                elms[i].dir = dir;
        }
    }

    if (body.style.display == 'none')
        body.style.display = 'block';

/* HERE COMES MY MODIFICATION */
    // Try to set caret into first text input field
    if (document.forms && document.forms.length > 0) {
        var inputs = document.forms[0].getElementsByTagName("input");
        if (inputs.length > 0) {
            for (i=0; i < inputs.length; i++)
                if (inputs[i].type && inputs[i].type.toLowerCase() == "text" && !textinput)
                    textinput = inputs[i];

            if (textinput)
                try { textinput.focus(); } catch (e) { }
            else
                try { inputs[0].focus(); } catch (e) { }
        }
    }
/* END OF MY MODIFICATION */

    // Execute real onload (Opera fix)
    if (tinyMCEPopup.onLoadEval != "")
        eval(tinyMCEPopup.onLoadEval);
}

Since the file "tiny_mce_popup.js" gets updated with every TinyMCE Release I'd have to do this modification manually every other release. This is why I'd like to suggest this change as an "official" one.

What do you think?

Greetings from Germany,

Felix Riesterer.

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

138

Re: What should we focus on in the future development of TinyMCE

an idea would be to change the plugins popup into a floating div, this way drag and drop could be implemented from things surrounding the the plugin popup and into the plugin popup, e.g. an image library on the left and you drag the image into the plugin popup window, actually even dragging into the editor is impossible now since its an iframe.

139

Re: What should we focus on in the future development of TinyMCE

Hi abood

abood wrote:

an idea would be to change the plugins popup into a floating div, this way drag and drop could be implemented

Are you familiar with the inlinepopups plugin? I wonder...

Greetings from Germany,

Felix Riesterer.

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

140

Re: What should we focus on in the future development of TinyMCE

Felix Riesterer wrote:

Hi abood

abood wrote:

an idea would be to change the plugins popup into a floating div, this way drag and drop could be implemented

Are you familiar with the inlinepopups plugin? I wonder...

Greetings from Germany,

Felix Riesterer.

am not, thanks for the hint

141

Re: What should we focus on in the future development of TinyMCE

spocke wrote:

...I came to the conclusion that it's better that TinyMCE is independent of third party libraries so that it won't conflict with other code/javascript on the same page based on other libraries or even other versions of the same library.

That's GREAT to hear!  I couldn't agree more.  There are so many JS frameworks out there, and everyone thinks the one they chose is the B-E-S-T.

It is very easy to add AJAX to some JS code without the bloat of a 3rd party library.  I use both approaches myself.  For very simple callbacks I use a stripped-down homegrown function, and for more full-featured pages I use the MS ASP.NET AJAX extensions.

Adding some quick AJAX stuff to TinyMCE increases the code size very little, while relying upon a specific add-on library would instantly bloat the code -- and make everyone either conform to your choice of library or else custom-write their own work-arounds.

Spocke and Afraithe, thank you for taking the position you have on this issue!

Last edited by speednet (2007-04-17 17:32:44)

142

Re: What should we focus on in the future development of TinyMCE

speednet wrote:
spocke wrote:

...I came to the conclusion that it's better that TinyMCE is independent of third party libraries so that it won't conflict with other code/javascript on the same page based on other libraries or even other versions of the same library.

That's GREAT to hear!  I couldn't agree more.  [...]
Spocke and Afraithe, thank you for taking the position you have on this issue!

Yes, I'm also happy to read this. It does support my own opinion on this matter. Why should website creators use those big monsters when some self-written code can do almost the same and is much leaner and easier to maintain and bugfix? PLUS: What do you do when the original authors decide to rewrite the hole darn thing from scratch and none of your adjustments work anymore?

Greetings from Germany,

Felix Riesterer.

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

143

Re: What should we focus on in the future development of TinyMCE

Yes, we pretty much have a new Ajax API that is very small and Tiny compared to other libraries. I guess we will take the best out of that one and re-scope it into the TinyMCE namespace. This approach will basically make TinyMCE smaller but yet more powerful and still library independent.

Some libraries our there are really cute but they tend to do more stuff than TinyMCE needs and they also tend to mess with internal objects.

Best regards,
Spocke - Main developer of TinyMCE

144

Re: What should we focus on in the future development of TinyMCE

What TinyMCE lacks is good user documentation, as others have mentioned. Throwing a bunch of API's in a Wiki doesn't cut it. This needs to be your NUMBER ONE priority. If the product is too complicated to document, perhaps you need to redesign the controls interface.

145

Re: What should we focus on in the future development of TinyMCE

I hope you don't talk about technical manuals. Since that is the best we can do, the Wiki contains all the info a developer would need to implement the editor in their system. If you have very specific needs and need to dig in deep the documentation is probably not that good but how to configure it, make plugins etc don't get much better than that. If you think you could do better why not contribute to the Wiki this is after all a community open source project so write away. smile

If you are referring to user manuals for how to use the editor from a end user perspective those are very our dated and should be moved to a wiki or something but this is not our main priority now.

Best regards,
Spocke - Main developer of TinyMCE

146

Re: What should we focus on in the future development of TinyMCE

To answer the focus question:
Try to eliminate the DeltaWidth issue that seems to keep creeping up. Primarily it is an issue with not being able to find the css it seems from the path it is set. It is very strange that it keeps popping up seemingly with each release as each seems to have some sort of configuration it likes before it works on IE. Stranger still, the error now comes up in 2.1.1.1 on FF2. Thats a first. So I haven't been able to upgrade from 2.1.0.

Here is a post about it for further info.: http://tinymce.moxiecode.com/punbb/view … hp?id=7235

147

Re: What should we focus on in the future development of TinyMCE

What TinyMCE lacks is good user documentation, as others have mentioned. Throwing a bunch of API's in a Wiki doesn't cut it. This needs to be your NUMBER ONE priority. If the product is too complicated to document, perhaps you need to redesign the controls interface.

As an open source project, the developers of TinyMCE are free to work on whatever itch they happen to have.  The most important thing they have done in this area is to set up the wiki itself.  This enables everyone to contribute to the documentation effort.  "everyone" is an inclusive term - if you are not happy with the documentation then you can contribute towards making it better.  If you feel strongly about it then you can contribute yourself.

You can of course influence the priorities of the developers - I am pretty sure they will be happy to work on whatever you pay them to work on.

Scott

(a.k.a. monkeybrain)

148

Re: What should we focus on in the future development of TinyMCE

Hi,

A possible feature to consider might be something to highlight changes the user made to the content in the editor.

Best regards,
Sylvain Girard

149

Re: What should we focus on in the future development of TinyMCE

How about making use of a cross-platform javascript library - this would have the potential to simplify some of the underlying code and could at the same time make it easier to add enhanced functionality in the future.

The hardest thing to do would be to select the js library to adopt.  One of the current leading lights would appear to be Ext JS (http://extjs.com/).

Have you guys discussed this before?

Scott

(a.k.a. monkeybrain)

150

Re: What should we focus on in the future development of TinyMCE

Read up a few posts, already commented on that.

Afraithe
TinyMCE Developer
Moxiecode Systems