-
-
CommentAuthorperthmetro
- CommentTimeJun 9th 2008
Hi all,
I'm trying to find out how to configure the insert image url path, Chris helped me do it for Nicedit a while back, back TinyMCE is a huge mess of files that i have no idea where to start, and the forums and wiki sites never explain it in simple terms.
I'd be sooo grateful if someone could lend me a hand on this one.
TIA
Pete -
-
- CommentAuthorfernbap
- CommentTimeJun 9th 2008
Yea, that is not explained in simple terms because it's not simple.
First thing you need is to call TinyMCE with its complete bundled plugins, by inserting in the header<script language="javascript" type="text/javascript" src="http://./tiny_mce/tiny_mce.js">script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "exact",
elements : "mycontent",
theme : "advanced",
language : "en",
plugins : "safari,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",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : true,
content_css : "./css/lightneasy.css",
extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]",
external_link_list_url : "example_link_list.js",
external_image_list_url : "image_list.js",
flash_external_list_url : "example_flash_list.js",
file_browser_callback : "fileBrowserCallBack" });
function toggleEditor(id) {
var elm = document.getElementById(id);
if (tinyMCE.getInstanceById(id) == null)
tinyMCE.execCommand("mceAddControl", false, id);
else
tinyMCE.execCommand("mceRemoveControl", false, id);
}
script>
If you don't want to include all plugins, just remove the plugin AND the respective button(s) from the listing above.
You can see here the command external_image_list_url : "./images/image_list.js", which defines the image list that will appear in a drop-down box in TinyMCE images dialog box. You can edit it so see its format.
The other is inputting the url to the image directly in the images dialog box.
But, in both cases, the image needs to be uploaded previously to the host and image_list.js updated (if you are intending to use it). TinyMCE doesn't do it on its own, so you need to have it done from outside TinyMCE. -
-
CommentAuthorperthmetro
- CommentTimeJun 9th 2008
Eh??? All I want to do is to be able to type in example.jpg into the image url dialog box and wholah! it appears. Surely there's a path that defines this. It works for a full url, so why not a relative one? -
-
- CommentAuthorfernbap
- CommentTimeJun 9th 2008
try "./example.jpg" -
-
CommentAuthorperthmetro
- CommentTimeJun 9th 2008
but I want to be able to just write example.jpg and hard code/configure the JS so that i don't need the ./ -
1 to 5 of 5
