Solved

TinyMCE and default needs to be Source Code

Posted on 2010-08-23
6
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 14

Expert Comment

by:Allan Nisbet
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 14

Expert Comment

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

Storm
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:Allan Nisbet
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 14

Accepted Solution

by:
Allan Nisbet 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Knowledge base software has turned out to be a quite reliable method for storing information, promoting collaborative work and for sharing valuable input and solutions.However, some organizations are trying to develop a knowledge base that works wit…
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…

726 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