Hey that’s all good news, I’m glad you got it worked out! (And good to know these two extensions don’t conflict anymore).
One other note, until I post an update it’s not a bad idea to go ahead and comment out the jquery loading line again if you’ve enabled jQuery for the CP… (since all my update really will do is completely remove loading jquery, depending instead on the jQuery CP ext, and fix some default settings bugs for brand new installs).
Has anyone gotten this extension to work for the wiki? (I have installed it, and gotten it to work with the CP, but nothing happens with the wiki.)
I did a search, but all I could come up with was a posting that asked about the wiki, but I didn’t see any definite responses about how to get it to work.
Kernon - to use it on a public facing page (like the wiki or comments or an saef) the easiest way is make sure you’re including jQuery, textile-editor.js, textile-editor-config.js, and textile-editor.css appropriately in your html head, then add a bit of jquery to initialize it for your particular text field.
I don’t have a wiki example, but here’s an example on Jambor-ee where they’ve added TEH to the comments field. If that doesn’t make sense post a link to your wiki and the url for your “teh” directory, and I could probably give you some test code for a head-start.
Incidentally, I’m working on updating the extension to make it compatible with jquery for the CP, fixing the IE bugs (IE7+ only), and a few other glitches which should be up in the next couple days.
-mike
I’ve released version 1.2 of TEH. New in this release:
Now compatible with jQuery for the CP extension in use by many other recent extensions.
Actually, it requires jQuery for the CP extension to be installed and active. (It comes bundled with EE 1.6.5+ or is available for download here).
URL and Email link buttons fixed in Internet Explorer (IE7+) - no more duplicate text.
URL and Email link buttons text selection handling improved in other browsers - text stays selected after adding links instead of cursor jumping to the end of the field
I’ve posted the new version at Github – so download the new version at Github!
Upgrade Note: I’ve changed the default location (for new installs) for the “teh” support directory to the themes folder instead of the site root. But if upgrading your current settings will be honored, so you can just replace the existing directory (along with the extension and language file of course) and you should be go. Don’t forget you can always check/set the location in the extension settings.
-mike
Weird, I have the same problem there with the zip but gzip seems fine. Not sure as I’m new to github (all the cool kids are doing it), but I attached it here as well… grab it at the top of the thread.
And of course let me know if you run into any issues at all…
I’m trying to create an address tag button, but TEH seems to choke on the “<” in < address >. It instead shoots out p.<address. Here’s the code I’m trying to use:
teButtons.push(new TextileEditorButton('ed_address', 'address-book.png', '<address>', '</address>', 'd', 'Address','s'));
Any ideas on how I can properly spit out the address tags?
Edit: Forgot the < >.
Have to agree with you there. I was very pleasantly surprised with Textile using TEH on the last site I did. The clients seemed to have no problems with it either once they got their head round it. Seems to be a happy medium that allows some control over formatting without giving too much control and the ability to break layouts!
Great extension.
Now i activate in some ee installations and i want to share my custom configuration supporting images and because i search in this forum and don’t find how to put a image insert button.
So here is my approach and i hope to works in ie (we tested in opera and works)
Download the fanfanfan icons and save the png icon to the TEH images folder and create the image link:
teButtons.push("<button id=\"ed_image\" onclick=\"addLink(this, ‘image’);return false;\" class=\"standard\"><img src=\""+teh_options.image_path+"image.png\" title=\"Image\" alt=\"Image\" /></button>");
(quoted because a parse error in the forum code tag)
And now the rest of the code, put it above the “// Prompt user and build URL link” part:
// Prompt user and build Image link
if (id == 'image') {
var link = prompt("Enter the image URL:", "http://");
var alt = prompt("Enter the ALT text:", "");
if (link == "http://" || link == "" || link == null || alt == null) return false;
if (textSelected) {
if(alt ==""){
link = '!'+selectedText+'(alt text)! ';
}else{
link = '!'+selectedText+'('+alt+')! ';
}
} else {
if(alt ==""){
link = '!'+link+'(alt text)! ';
}else{
link = '!'+link+'('+alt+')! ';
}
}
}
Thats it, again many thanks for share this extension with the ee community
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.