2

I added the TinyMCE rich text editor to my site and it works nicely and was easy to implement.

The problem is that now the original text box renders, and the rich text box appears after 2 seconds - which makes the user experience really half-baked.

Here is an example of this effect: http://www.problemio.com/add_problem.php

See how the simple text box loads and then 2 seconds later the rich text textbox loads on top of it? How can I prevent that and just have the rich text textbox load?

Thanks!!

(I used Chrome browser to reproduce this)

GeekedOut
  • 16,905
  • 37
  • 107
  • 185
  • Try setting the textarea "problem_blurb" CSS to "display: none" so it will never show, which should solve that part of the unwanted refresh as TinyMCE does its progressive markup. TinyMCE just hides the HTML textarea anyway. This will not degrade for browsers with Javascript turned off, however, so they will be unable to fill out the form. – grav3nimag3 Oct 24 '11 at 20:20
  • @grav3nimag3 thanks - by the way, once I hide the original form, how do I get the value of the new form element? It is referred to something else in the TinyMCE system and I am not sure where there reference is set. Any idea? Thanks!! – GeekedOut Oct 24 '11 at 21:16
  • Try [this](http://stackoverflow.com/questions/2122085/problem-jquery-and-tinymce-textarea-value-doesnt-submit). – grav3nimag3 Oct 24 '11 at 21:39
  • @grav3nimag3 yeah the link you posted is also a problem I am exeriencing. Going to try to see if that link helps :) – GeekedOut Oct 24 '11 at 21:46
  • That stinks. Looks like TinyMCE blindly picks up the `style` attribute from the parent field. Messy, but there is a hide/show method in the TinyMCE API [here](http://www.tinymce.com/wiki.php/API3:class.tinymce.Editor). That should override the inline `display: hidden` style attribute. – grav3nimag3 Oct 24 '11 at 21:55
  • @grav3nimag3 Trying the latest suggestion now. I did get it to recognize the input from the second input try so at least it is some progress...will report what happens in a few min after I try the API suggestion. – GeekedOut Oct 24 '11 at 22:04
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/4496/discussion-between-geekedout-and-grav3nimag3) – GeekedOut Oct 24 '11 at 22:05

1 Answers1

0

Possibly not the best solution but a quick fix, but you could mask out the content until the page has finished loading using javascript.

osnoz
  • 1,127
  • 1
  • 11
  • 16