I'm wondering how I can modify the dialog box which pops up for "insert image". I'd like to add code into this dialog box to allow the user to select an image from a list. I've found the code within the wymeditor.js which seems to generate the HTML but it just won't change.
I'm assuming that because the HTML code is embedded into the Javascript, I'm going to struggle to insert PHP queries into it. I was going to settle (begrudgingly) with a link which opens a new window.
- Code: Select all
dialogImageHtml: "<body class='wym_dialog wym_dialog_image'"
+ " onload='WYMeditor.INIT_DIALOG(" + WYMeditor.INDEX + ")'"
+ ">"
+ "<form>"
+ "<fieldset>"
+ "<input type='hidden' class='wym_dialog_type' value='"
+ WYMeditor.DIALOG_IMAGE
+ "' />"
+ "<legend>{Image}</legend>"
+ "<div class='row'>"
+ "<label>{URL}</label>"
+ "<input type='text' class='wym_src' value='' size='40' />"
+ "</div>"
+ "<div class='row'>"
+ "<label>{Alternative_Text}</label>"
+ "<input type='text' class='wym_alt' value='' size='40' />"
+ "</div>"
+ "<div class='row'>"
+ "<label>{Title}</label>"
+ "<input type='text' class='wym_title' value='' size='40' />"
+ "</div>"
+ "<div class='row row-indent'>"
+ "<input class='wym_submit' type='button'"
+ " value='{Submit}' />"
+ "<input class='wym_cancel' type='button'"
+ "value='{Cancel}' />"
+ "<input class='wym_submit' type='button' value='click for images'>"
+ "</div>"
+ "<div><p onClick='window.open('insert_image.php','mywindow','width=300,height=300,right=0,top=100,screenX=200,screenY=20')'>Click Here to View Images</p></div>"
+ "</fieldset>"
+ "</form>"
+ "</body>",
Aside from the likelihood that the js I've inserted will cause an error, it's not even loading when you try to insert an image. It just seems to ignore that line altogether (I've tried a generic text change too and that didn't work).
Can anyone please help?
Thanks!!