We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Textile Editor Helper (TEH) extension

Development and Programming

imagehat's avatar
imagehat
68 posts
16 years ago
imagehat's avatar imagehat

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).

       
Kernon's avatar
Kernon
173 posts
16 years ago
Kernon's avatar Kernon

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.

       
imagehat's avatar
imagehat
68 posts
16 years ago
imagehat's avatar imagehat

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

       
Kernon's avatar
Kernon
173 posts
16 years ago
Kernon's avatar Kernon

Thanks for the quick reply, Mike. I’ll take a look at that example, as well as watch this thread for your update.

       
imagehat's avatar
imagehat
68 posts
16 years ago
imagehat's avatar imagehat

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

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

Dunno if it’s a Github thing but it won’t download. Just keeps doing the “Hardcore Archiving Action” thang.

       
imagehat's avatar
imagehat
68 posts
16 years ago
imagehat's avatar imagehat

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…

       
Eric Barstad's avatar
Eric Barstad
198 posts
16 years ago
Eric Barstad's avatar Eric Barstad

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 < >.

       
Eric Barstad's avatar
Eric Barstad
198 posts
16 years ago
Eric Barstad's avatar Eric Barstad

Was able to get it to work using:

teButtons.push(new TextileEditorButton('ed_address', 'address-book.png', '\b<address>\n\b', '\n</address>', 'd', 'Address','s'));
       
stinhambo's avatar
stinhambo
1,268 posts
about 16 years ago
stinhambo's avatar stinhambo

This is an awesome extension and now standard on all our sites.

Much better than the WYSIWYG car crash that is TinyMCE.

       
angstmann's avatar
angstmann
225 posts
about 16 years ago
angstmann's avatar angstmann

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!

       
vik407's avatar
vik407
15 posts
about 16 years ago
vik407's avatar vik407

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

       
Dylan Smith/Context Design's avatar
Dylan Smith/Context Design
346 posts
15 years ago
Dylan Smith/Context Design's avatar Dylan Smith/Context Design

Is anyone else having problems w/ 1.6.8?

I just upgraded, and wanted to give TEH a shot, but I keep getting an error: “$(“#” + canvas).TextileEditor is not a function”

       
imagehat's avatar
imagehat
68 posts
15 years ago
imagehat's avatar imagehat

ContextDesign - that sounds like an error when jQuery is not included. Are you sure the CP jQuery extension is active and working?

       
Dylan Smith/Context Design's avatar
Dylan Smith/Context Design
346 posts
15 years ago
Dylan Smith/Context Design's avatar Dylan Smith/Context Design
ContextDesign - that sounds like an error when jQuery is not included. Are you sure the CP jQuery extension is active and working?

It’s on and working just fine for everything else, except I’m having weird JS errors w/ Markitup as well.

       
First 9 10 11 12 13

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.