Text Editor Flickering Effect While Loading

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Text Editor Flickering Effect While Loading

Postby sovanm » Mon Jun 16, 2014 8:14 am

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 758 times

Thanks,
Sovan
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Re: Text Editor Flickering Effect While Loading

Postby david » Mon Jun 16, 2014 5:05 pm

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()
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1723
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.


Return to Web Development

Who is online

Users browsing this forum: No registered users and 2 guests