1. Pagination is typically generated within the PHP controller, and then the appropriate template is included within theme templates.
\IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->pagination( $this->baseUrl, $this->pages, $this->page, $this->limit, TRUE, $this->paginationKey, $this->simplePagination )
Swap out the parameters as appropriate of course. Alternatively, you can use something like the table helper (\IPS\Helpers\Table) which handles things like pagination automatically.
2. You should not need to pass any content in the database through any sort of parser before putting it in the editor.