Jump to content

How to use wysiwyg editor in an admin addon?


dansgalaxy

Recommended Posts

  • 2 years later...
Hey im devin a addon for whmcs, just wondered what the easiest way to use the wysiwyg textarea editor so dont have to have a redundant copy just for this...

 

cheers

Dan

 

About two years later... I'm trying to to the same thing. Isn't there an answer to this?

Link to comment
Share on other sites

All I've done to achieve this is add this code:

 

		<script language="javascript" type="text/javascript" src="editor/tiny_mce.js"></script> 
		<script language="javascript" type="text/javascript"> 
		tinyMCE.init({
			mode : "textareas",
			theme : "advanced",
			entity_encoding: "raw",
			convert_urls : false,
			relative_urls : false,
			plugins : "style,table,advlink,inlinepopups,media,searchreplace,contextmenu,paste,directionality,visualchars,xhtmlxtras",
			theme_advanced_buttons1 : "cut,copy,paste,pastetext,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,search,replace",
			theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,cleanup,code,help",
			theme_advanced_buttons3 : "", // tablecontrols
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true
		});
		function toggleEditor(id) {
			if (!tinyMCE.get(id))
				tinyMCE.execCommand(\'mceAddControl\', false, id);
			else
				tinyMCE.execCommand(\'mceRemoveControl\', false, id);
		}
		</script>'

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated