Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#691 2009-12-06 23:25:12

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: hak_tinymce WYSIWYG article editor

Hi Patrick,
I have solved all my problems with the image upload. Now everiting works beautifully.
Of course this was not a plugins fault but an oversight on my side, sorry.
I set my test site using virtual host so the correct address should have been http://my_site/textpattern... But soon I forgot so instead I was using http://localhost/my_site/textpattern... and this caused the errors.
Thank you again for the help and sorry for the hassle.

Offline

#692 2009-12-07 07:04:01

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,416
Website GitHub Mastodon

Re: hak_tinymce WYSIWYG article editor

Patrick, may I suggest to add

entity_encoding:"numeric",

to TinyMCE’s default init options for the sake of feed XML validity?

Offline

#693 2009-12-07 14:55:09

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

Seems reasonable. I’ll add that in for the next go round. I’ll stick before the user supplied initilaization is supplied that way it can be overridden if need be.


Shoving is the answer – pusher robot

Offline

#694 2009-12-08 18:19:35

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

@allmandring: This has come up before. The problem is that teh popup has lots of tinymce tentacles in it. Although now that jQuery is bundled it wouldmake it easier. hmmm…


Shoving is the answer – pusher robot

Offline

#695 2009-12-09 05:58:35

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,416
Website GitHub Mastodon

Re: hak_tinymce WYSIWYG article editor

I am looking for a way to keep TinyMCE from filtering out my Textpattern tags. Adding all relevant tags to options like so

extended_valid_elements:"txp:email[*], txp:image[*], txp:whatever[*]",
custom_elements:"~txp:email, txp:image, txp:whatever",

is obviously painful and doesn’t cut it for the occasional plugin. Is there a way to keep TinyMCE from mingling with the whole txp: namespace? I’ve tried txp:*[*] for extend_valid_elements without success.

Offline

#696 2009-12-09 14:20:00

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

Not that I know of. The whole custom_elements thing is fairly new, so I haven’t poked at it to see how’s implemented. What I had thought of doing was writing a custom cleanup routine that would turn <txp:tagname> into <txp_tag name=“tagname”> and back again on save that way you just needed to allow <txp_tagname[*]>

I haven’t really explored it a ton though.

Another thing to consider is doing valid_elements:"*[*]" and then prohibiting things in invalid_elements. From looking at the code you can then do custom_elements:"txp:\\S+"

But yeah it’s not great to allow all txp tags but this is better than it used to be.

More thoughts. Have you tried txp*[*] ? I wonder if that will play better since the colon is reserved.

Last edited by hakjoon (2009-12-09 21:46:22)


Shoving is the answer – pusher robot

Offline

#697 2009-12-09 23:55:39

linkstate
New Member
Registered: 2009-12-09
Posts: 2

Re: hak_tinymce WYSIWYG article editor

I have few problems to run this properly. Finally I’ve managed to get image pickup working. Here is some info if you deal with something similar.

1. problem – for me image pickup (ajax requests) doesn’t work on http://domain.com but on http://www.domain.com is working.

wokaround – work only on www.domain.com

2. problem – IE and 1px width images was because in source I had thumbnail width=”“, FF handle this but IE not.

solved – upgrade to 4.2.0 brings us thumnail width and height numbers to db (and this hak_tinymce plugin takes it from there), check your txp_image table in db. If you have 0 width height use plugin soo_thumb_atts for filling thumbnail width, height numbers in db (new thumbnails under 4.2.0 are filled properly).

Offline

#698 2009-12-10 00:37:11

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

@linkstate: glad you got that worked out. the domain thing is a general javascript issue. I might explore at some point seeing if I can make that use a relative path.

@wet: This works for me to allow all txp tags

 extended_valid_elements:"txp*[*]",
custom_elements:"txp:\\S+",

there is no visual feedback that the tag is there. if you want to get something you can do some fancy css generated content stuff (IE6 won’t do this, I’m not sure about IE7). Specify a stylesheet for the content_css property and in it put:

div[mce_name]:before {
content:"<" attr(mce_name) ">";
}

div[mce_name]:after {
content:"</" attr(mce_name) ">";
}

this will show you the tag you inserted. BTW the tags seem to get converted to open and close tags so <txp:image /> becomes <txp:image></txp:image>

Last edited by hakjoon (2009-12-10 00:40:31)


Shoving is the answer – pusher robot

Offline

#699 2009-12-10 01:37:37

davidsess
Member
From: New York, NY
Registered: 2008-01-02
Posts: 20
Website

Re: hak_tinymce WYSIWYG article editor

I installed 9.8 with TXP 4.2, and am getting this error:

“Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/vhosts/patrolmag.com/httpdocs/textpattern/lib/txplib_misc.php(594) : eval()’d code on line 26 The above errors were caused by the plugin:hak_tinymce.”

I saw tRM had the same issue a few pages back, but I don’t see whether or not it was resolved.


http://www.patrolmag.com

Offline

#700 2009-12-10 02:22:43

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

@davidsess: Are you using php 4?

Nevermind I can recreate it in php4, due to the method visibility properties. I forgot that wasn’t there in php 4.

0.9.9 works in php4 so this should hopefully fix tRM’s problem too.

oh and @wet this has the numeric entity encoding in the default init as well.

Last edited by hakjoon (2009-12-10 02:44:10)


Shoving is the answer – pusher robot

Offline

#701 2009-12-10 07:54:58

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,416
Website GitHub Mastodon

Re: hak_tinymce WYSIWYG article editor

hakjoon wrote:

BTW the tags seem to get converted to open and close tags so <txp:image /> becomes <txp:image></txp:image>

Thanks, this is a nice workaround for the limited tag capabilities I need right now. Nevertheless, I’ve just discovered the codeprotect tinyMCE plugin. Exploring…

Offline

#702 2009-12-10 15:31:22

davidsess
Member
From: New York, NY
Registered: 2008-01-02
Posts: 20
Website

Re: hak_tinymce WYSIWYG article editor

Dammit. I just upgraded to PHP5 in hope that would fix it. Now I’m seeing errors on the left side of the article page, where the “Toggle Editor” link should be.

I will install 9.9 today and see what happens.


http://www.patrolmag.com

Offline

#703 2009-12-10 15:48:57

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

@davidsess: Did you run the install through the extensions->hak_tinymce tab? You’ll get some errors there if you haven’t installed the plugin table, it’s supposed to do it in the background but I’ve got some logic missing somewhere.

I need to figure out how to use the new plugin install/uninstall events.


Shoving is the answer – pusher robot

Offline

#704 2009-12-10 16:01:42

davidsess
Member
From: New York, NY
Registered: 2008-01-02
Posts: 20
Website

Re: hak_tinymce WYSIWYG article editor

I deleted everything and uninstalled the old version. Now it won’t even show up in the extensions tab … anytime I have the plugin activated, the errors are showing up.


http://www.patrolmag.com

Offline

#705 2009-12-10 16:03:58

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

What are the errors?


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB