Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: hak_tinymce WYSIWYG article editor
The textpattern parts of the interface are also translatable now and are cued off the selected language used for the interface. Currently only en-us but if anyone is interested in providing translations into other languages I will include them
Shoving is the answer – pusher robot
Offline
#50 2006-02-08 02:57:37
- simonbarne
- New Member
- From: Jakarta, Indonesia
- Registered: 2006-02-07
- Posts: 3
Re: hak_tinymce WYSIWYG article editor
When I reopen an existing article, the plain text appears momentarily then vanishes when the WYSIWYG editor panel appears. Even if I toggle editor back, the text area is now blank – the article text is lost.
It doesn’t seem to make any difference whether the article was originally created as plain text or with Textile or in the WYSIWYG editor. Nor does changing the preference ‘Use Textile’ or ‘Leave text untouched’ have any effect.
I’m probably being dim, but does anyone have any ideas?
Offline
Re: hak_tinymce WYSIWYG article editor
What browser are you seeing this in?
Is textpattern at least at version 4.0.2?
Just to make sure I understand. The editor is coming on by default even if you have “use textile” set in the site wide preferences?
Shoving is the answer – pusher robot
Offline
#52 2006-02-08 04:29:12
- simonbarne
- New Member
- From: Jakarta, Indonesia
- Registered: 2006-02-07
- Posts: 3
Re: hak_tinymce WYSIWYG article editor
Thanks for such a swift reply.
Browser Firefox 1.5. Textpattern 4.0.3. Preferences say ‘Use Textile’. WYSIWG editor appears by default. If an article is reopened, the editor appears after a second (and wipes the text area).
Offline
#53 2006-02-08 04:52:23
- simonbarne
- New Member
- From: Jakarta, Indonesia
- Registered: 2006-02-07
- Posts: 3
Re: hak_tinymce WYSIWYG article editor
Panic over – I’ve reinstalled the plugin and so far it’s working fine. (Tremendous plugin!) Sorry to waste your time.
Offline
Re: hak_tinymce WYSIWYG article editor
Thanks for this plugin, works perfectly for me.
However, the (body) text is saved in the body and the body_html columns of the textpattern table with html tags. Is there any chance to save it once without the html tags and once with it, as it is for the textile stuff? I’m asking because of the send article function in zem_contact_reborn. This way, the article text could be fetched easily for text emails.
Offline
Re: hak_tinymce WYSIWYG article editor
The two columns in the table are for the textile stuff, so you have a converted version and a textiled version. I’m assuming when the setting is set to “Leave text untouched” it just saves it the same way in both columns.
It’s relatively easy to check the textile setting for the article, so zem_contact reborn could run a strip_tags() or something for sending the article. That’s the way comments get their HTML tags stripped out.
Shoving is the answer – pusher robot
Offline
Re: hak_tinymce WYSIWYG article editor
> hakjoon wrote:
It’s relatively easy to check the textile setting for the article, so zem_contact reborn could run a strip_tags() or something for sending the article. That’s the way comments get their HTML tags stripped out.
The problem is not the tags, that I can strip, but the html entities. Some of them don’t get decoded correctly.
Last edited by tranquillo (2006-02-08 16:49:10)
Offline
Re: hak_tinymce WYSIWYG article editor
Basically when an article is saved it runs through something to determine whether to textile it or convert line breaks or do nothing at all. The converted string is stored as body_html. When the textile setting is set to “leave text untouched” it just copies body into body_html I’m not sure there is a way to override it and you would still be stuck with the situation that html and entities would have to be stripped and converted to be stored in body and then when you went to edit the article it would have to know to pull body_html instead of body.
Anyway it starts hitting some deep behaviors and it could cause some issues if someone decides to stop using the editor for some reason. I know they are building functionality in crockery to allow for different ways of processing the text (for markdown for example), maybe once that is in there the wysiwyg editor could become a text processing mode that would do various things differently on article save.
It also seems that if you are relying on body to send articles you could end up sending articles with textile formating in it. One thing that could probably be done is to run body_html through strip_tags() and then run that result through html_entity_decode(). It seems that would leave you with just ASCII text.
Last edited by hakjoon (2006-02-08 17:28:40)
Shoving is the answer – pusher robot
Offline
Re: hak_tinymce WYSIWYG article editor
Tranquillo,
I just realized you are helping Stu with reborn. Sorry if my previous reply was too novice oriented for you. I’m never sure of people’s skill levels.
Shoving is the answer – pusher robot
Offline
Re: hak_tinymce WYSIWYG article editor
Hey no problem hakjoon. I actually understood all that. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: hak_tinymce WYSIWYG article editor
Your newest release is brilliant hakjoon. I love the addition of the form for initialization, it makes updating a breeze now.
Refresh Dallas and other Refreshing Cities.
Offline