Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-11-27 11:26:55

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

JS edit, new value

hello,
I use hak_tinymce editor, but is one thing what I cant do with this plugin.
I wanted to add some small images [thumbnails] in my article, whos should be possible to see in bigger size [with Lightbox], maybe someone can help me to add some button in button menu, who format theese small images [thumbnails] image in Lightbox style ?
[EDIT] I think, that need to copy LINK button files or code and just add some code lines, but how to do that corectly?

[EDIT2]
tiny_mce/themes/advanced/js/link.js
http://pastebin.com/Gp3HychS
I think that there should add new value, REL, like value TITLE, but I’m not JS expert, maybe someone can help?

Last edited by elwins (2011-11-27 14:57:34)

Offline

#2 2011-11-27 15:37:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: JS edit, new value

I’ve not installed tiny_mce for ages, so can’t help with exactly that. But I know

  1. smd_macro lets you tailor complicated tags/tag combos to your needs. Inserting a tag like <txp:lightbox img="" /> suffices to insert a pretty complicated nesting of any tag innards.
  2. The complete read-only code fool I am, succeeded in modifying rah_textile_bar in that it can insert spans with classes now. Either you try if hak_tinymce is capable of inserting such tags or, you modify it accordingly or, you consider using rah_textile_bar.

Hope that helps. Edit I see you’ve edited your post a second time. Still had it open from after your first edit.

Last edited by uli (2011-11-27 15:41:59)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2011-11-27 15:41:03

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: JS edit, new value

I need to add images to article with possibility to look at them in original size.

I almoust resolve that problem, but I don’t know JavaScript.

All what I need is, to add REL value function in this JS file
http://pastebin.com/Gp3HychS like it is for TITLE value.

Offline

#4 2011-11-27 18:20:08

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: JS edit, new value

If you can add a class to a link with tiny_mce (which I believe you can), the simpler alternative will probably be to use a lightbox script that can be triggered by a class instead of the rel attribute, for example lightbox_me (ultra-simple and lean) or rlightbox (which is more full-featured and does grouping by class). With this approach, you won’t run into validation problems due to unregistered rel values either.

Last edited by jakob (2011-11-27 18:30:08)


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB