Extend Tumult Hype with JavaScript: hypeDocument.extensions

This is just a slightly edited version that shows how to do a facsimile of an indent.

In the extension we would add code like this to Auto type.

	///<indent>
	if  (charArray[i +1] == "i" && charArray[i +2] == "n" && charArray[i +6] == "t" && charArray[i +7] == ">") {
 
     charItem = "\<span style=\"padding-left:2em\"\><\/span>";
		i = i + 7
		
		}

The Keydown type would have something similar.

The tag I use is just the made up one of <indent>

What we put in it's place is a span with padding. This seems the simplest way.

More ideas and measure can be found here.

The one thing you will have an issue with and why I used a span here is if you want to use open and closing tags.

i.e <blockquote> blalalalah </blockquote>

You will find that it will be probably hard to code. Partly because as soon as you insert the first tag the browser may automatically close it. The other issue is the type is moving by 1 char at a time and you need to keep the correct chars inside the tags as it types. Not saying it cannot be done..

But what this does show you and others is how to set up you own single tags.

TypeTextExtension_v132_indent.hypetemplate.zip (13.9 KB)

see this thread post in regards to the request for this edit