Solved

TinyMCE and default needs to be Source Code

Posted on 2010-08-23
6
325 Views
Last Modified: 2012-05-10
Hello experts:

Is there any way for the textarea to show the Source Code by default when a user enters the page....??  At present it shows the "pretty version".

Below is the code that I am using at present for TinyMCE.

Any help will be greatly appreciated.

--d.
<script type="text/javascript">

tinyMCE.init({

	theme : "advanced",

	mode : "textareas",

//	plugins : "fullpage",



plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

	

		// Theme options

	theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",

	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",

	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",

	theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",

	theme_advanced_toolbar_location : "top",

	theme_advanced_toolbar_align : "left",

	theme_advanced_statusbar_location : "bottom",

	theme_advanced_resizing : true

});

</script>

Open in new window

0
Comment
Question by:driven13
  • 4
  • 2
6 Comments
 
LVL 13

Expert Comment

by:StormITSolutions
ID: 33506845
You can set the users preference to use no editor and you will always see html only

but i reckon this isnt what your after

Storm
0
 

Author Comment

by:driven13
ID: 33506857
Hi:

Thanx for the response.

Where and/or how can I set the user's preference to use no editor..???

Maybe if I see what it looks like I will know better.

--d.
0
 
LVL 13

Expert Comment

by:StormITSolutions
ID: 33506882
site>user manager> select user> user editor> editor - no editor

Storm
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 13

Expert Comment

by:StormITSolutions
ID: 33506883
in the joomla backend

Storm
0
 

Author Comment

by:driven13
ID: 33506890
Ahhh sorry Storm.  I am not using Joomla.  I am using this with Classic ASP pages.  

Sorry for not mentioning this before.

I figured there might be a setting in the TinyMCE controls that will let me do this.

--d.
0
 
LVL 13

Accepted Solution

by:
StormITSolutions earned 500 total points
ID: 33506925
ah, not sure why this appeared within joomla section

Best bet is to use the tinymce website and follow the advice there

http://tinymce.moxiecode.com/

Storm
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
First of all, we will need Jumi component or Sourcerer plugin for this to work. We need either of these because the main focus here is custom development outside of the standard modules or articles within Joomla. You can find Jumi here...it's my …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now