So, we use the Joomla default editor TinyMCE.

It's working fine, but has limited configuration options built into Joomla interface.

We need to make sure that links pasted into forum posts do not transport users right off of our site !

So I want to configure it so that the default link target is always "_blank" - to open in a new tab.

The TinyMCE documents describe using "tinymce.init" 


However, this ".init" file doesn't seem to reside anywhere handy, for setting defaults. The docs imply that it's normally just pasted into the page code that actually inserts the editor. But I am not sure which files to edit!! ( been searching for a while, cant find any references to tinymce.init )

Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
  • Re: Forum posts - how to set default target for links pasted into topics and replies??

    by » 4 months ago

    Tinymce editor os heavily overridden. Joomla has a wrapper around TinyMCE. In some of my projects, below is the code I use to initiate editors manually.

    if(typeof tinyMCE != 'undefined' && $('#'+target).length > 0) {
    	try	{
    		var pluginOptions = Joomla.getOptions ? Joomla.getOptions('plg_editor_tinymce', {})
    				:  (Joomla.optionsStorage.plg_editor_tinymce || {});
    		Joomla.JoomlaTinyMCE.setupEditor(document.getElementById(target), pluginOptions);
    	catch (e) {}

    I am not sure how to add options dynamically to existing editor, but you can try with Joomla.JoomlaTinyMCE options.

    The better way is to use content plugin to replace links to target blank.

    Follow me on twitter:
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    CjFitCjForum | Polls | Answers | Quizzes | Quotes | Surveys | GPS Tools | CjBlog

    Thank you said by: rotec

You do not have permissions to reply to this topic.

Powered by CjForum

Site Search

Subscribe Newsletter