How to auto-focus RTE editor inside firefox?

Question!

We have a RTE editor based on htmlarea which consists of content with editmode enabled inside an iframe. The question is how to automatically bring the focus into the editor.



Answers

Where the id of the IFRAME is myRTE:

var iframe = document.getElementById("myRTE");
if ( iframe && iframe.contentWindow )
   iframe.contentWindow.focus();
By : Shog9


I guess what you need to do is a. copy the 2000 records PK value into a temporary table with the same standard limit, etc. b. select the same 2000 records and perform the necessary operations in the cursor as it is. c. If successful, run a single update query against the records in the temp table. Clear the temp table and run step a again. d. If unsuccessful, clear the temp table without running the update query. Simple, efficient and reliable. Regards, KT

By : Kapil


While you cannot likely fix the problem of space usage (it is temporary, just until a vacuum) you can probably really speed up the process in terms of clock time. The fact that PostgreSQL uses MVCC means that you should be able to do this without any issues related to newly inserted rows. The create table as select will get around some of the performance issues, but will not allow for continued use of the table, and takes just as much space. Just ditch the index, and rebuild it, then do a vacuum.

drop index replication_flag;
update big_table set replicated=0;
create index replication_flag on big_table btree(ID) WHERE replicated=0;
vacuum full analyze big_table;


This video can help you solving your question :)
By: admin