Page 1 of 1

Text Editor Flickering Effect While Loading

PostPosted: Mon Jun 16, 2014 8:14 am
by sovanm
Hello All,

I have a requirement to have a text editor in servoy. But that text editor should have few options rather than all the options it shows by default. I have achieved it but facing a problem while rendering it.

What I have done so far.
1) Placed a HTML_AREA and made it editable.
2) onLoad method I have written my code(YUI code) to remove the options which are not required and inject it using via webCleintUtils executeJS method.

It is removing and shows those selected option, but my problem is, initially while the page loads, it shows all the options then changes it self and shows the selected options. This is causing a flickering effect.

Am I doing anything wrong or there is any other way to fix it.
Hope I made my problem clear.

Please see below, this is the final output, but just before this I am getting the annoying effect.
editor.png
editor.png (15.4 KiB) Viewed 2130 times

Thanks,
Sovan

Re: Text Editor Flickering Effect While Loading

PostPosted: Mon Jun 16, 2014 5:05 pm
by david
Doing stuff to a dom element after it is rendered means it has to redraw. The smoke and mirrors approach then would be to hide all text areas as Servoy renders them the first time by putting something like this in your external style sheet:

Code: Select all
textarea {
   display: none;
}


Then when you're done applying YUI code changes, show all your text areas manually. Jquery example: $('textarea').show()