Log in   Register a New Account

Accessify Forum - Independent Accessibility Discussion Since 2003; Professional, Moderated, Web-based, Archived

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

Currently Online

No registered users are online.

Xstandard Lite – Javascript Insert Code

Reply with quote I have a some small bits of code that I like to insert in my pages.

Currently I use a small javascript on a button to insert the code at the beginning of the XStandard form

e.g.

Code:
function insert_PageText(insert_HTML) {
var PageText_Insert = document.getElementById(’PageText_insert’).value;
var PageText_Insert = insert_HTML;
var PageText_Original = document.getElementById(’editorPageText’).value;
document.getElementById(’editorPageText’).value = PageText_Insert + PageText_Original;
}



Code:
onClick="insert_PageText('<img src=’../images/logo.gif’ />’);"


In other Code editors you can click to insert code where the cursor is currently positioned. Is this possible in XStandard Lite?

If so how? Please provide me with code if there is any thanks.
Reply with quote This is a feature of the Pro version. A license file transforms Lite into Pro. Point to the license file via a License param tag like this:

Code:
<param name="License" value="http://yourserver/license.txt" />


Then you can use API like InsertXML() or InsertText() to insert at the cursor position. For example:

Code:
document.getElementById(’editorPageText’).InsertXML(insert_HTML);


FYI, this forum is dedicated to discussions on ways to make the markup generated by the editor more accessible. Feel free to contact XStandard Support for all other issues – you’ll get a faster reponse that way too. Wink

Vlad Alexander
XStandard Development Team
http://xstandard.com

Display posts from previous:   

All times are GMT

  • Reply to topic
  • Post new topic