Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2006-04-06 22:01:37

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: hak_tinymce WYSIWYG article editor

I’ve included the correct above code for inserting the <code><p></code> tag by default. It is working but not exactly. The <code><p></code> tag is getting inserted but before whatever text I type in. So the outcome looks <code>like <p>&nbsp;</p></code>text here. Even though there are no spaces in the text box before the text. It’s in the first possible position it could be in. Anybody else having this issue? I’m using firefox 1.5

Also, I just came across this plugin and am switching over an older client site to use this. I haven’t played with it for more then 5mins but during the converting process in my article I have links that have classes to them. When I go to edit the links, I see all the fileds like title, open in new window etc, and it also includes a select drop down for classes.

However when I go to publish the article it strips the class out from the link. Also for new articles I am not giving an option to pick a class for new links I’m trying to create.

Is this possible or is the css not tied in with this plugin?

Last edited by LeeUmm (2006-04-06 22:03:01)

Offline

#98 2006-04-06 22:15:21

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

Re: hak_tinymce WYSIWYG article editor

That’s because class is not specified in the default list of valid attributes. There are two ways to fix this.

  1. you can setup your own init using the init form option, which has everything you need. This is better for upgrades.
  2. find this piece of code in the plugin extended_valid_elements : "a[name|href|target|title|onclick] and add class to the list of valid attributes.

The plugin is not tied to the css at the moment because I haven’t quite figured out a way to make it use the section’s specifi CSS. If you have a CSS file you want to always use you can specify it using one of the init options. Check out the Moxiecode Docs for all the options.

I’m not sure about the paragraph thing. I just haven’t tested that enough.

Last edited by hakjoon (2006-04-06 22:16:48)


Shoving is the answer – pusher robot

Offline

#99 2006-04-07 15:55:19

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

Re: hak_tinymce WYSIWYG article editor

Inserting a &nbsp; between the Paragraph tags seems to make Firefox correctly insert new content inside the Paragraph tags, otherwise it does seem to insert the content either before or after the Paragraph tags. It does leave with an extra &nbsp; though.

Putting in more the one paragraph of text will force it all into Paragraphs so it’s mostly a problem for very short entries. Could maybe try to run something on the save callback and check if there are paragraphs around the content.


Shoving is the answer – pusher robot

Offline

#100 2006-04-09 15:47:51

beztak
Member
From: Czech Republic
Registered: 2005-07-21
Posts: 184
Website

Re: hak_tinymce WYSIWYG article editor

Ouh, and there is another problem. In Maxthon (IE based browser) works putting <code><p></p></code> correctly, but problem is when you save your post and you don’t want to use excerpt. When you save your post excerpt isn’t empty, there is an empty paragraph. And when I use if_excerpt it always returns excerpt or EMPTY paragraph… It will need some save callback to check if there is empty paragraph in excerpt…

Offline

#101 2006-04-09 16:57:42

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

Re: hak_tinymce WYSIWYG article editor

Yeah right now it uses the same initialization for both the body and the excerpt. That’s something I’m hoping to change.


Shoving is the answer – pusher robot

Offline

#102 2006-04-11 22:43:06

Yurodivy
New Member
Registered: 2004-10-29
Posts: 9

Re: hak_tinymce WYSIWYG article editor

Still tracking through this thread, but haven’t seen anything on this question specifically…

Does the image and file upload functionality within the editor toolbar work?

Offline

#103 2006-04-12 00:35:01

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: hak_tinymce WYSIWYG article editor

I actually came here to ask something similar now that I’ve had more time to play with this.

I’m not sure about the file upload fucntion as I haven’t had the need for it yet but the image part does. At least to some degree anyway. I can upload the images through textpatterns image upload section and then when writing an article I can use the image button on the toolbar and insert the image into the article.

I’ve included my own css for the editor to use which is working. What I’d like to do however is when including an image, I’d like to pick a class to attach to the image. I’m given the option to pick classes for links and divs I insert but not for the images.

Is it at all possible to modify this to offer this ability?

Offline

#104 2006-04-12 02:59:03

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

Re: hak_tinymce WYSIWYG article editor

I’m not sure what you mean by file upload feature.

I’m hoping to swithc the image insert tool to the native tinyMCE one which is much better IMHO. It has the option for classes etc. The long term goal is to integrate it with im_popper or something like that, but that’s a little more involved. I’m hoping to start working on an update this week.


Shoving is the answer – pusher robot

Offline

#105 2006-04-13 22:31:53

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: hak_tinymce WYSIWYG article editor

Okay just a few more things and I think I’ll be set.

1) I switched to the gzipped version and everything still works fine but in my javascript console I get the following error: tinymce_engine is not defined. The line of code being: TinyMCE_Engine.prototype.onLoad(); Everything still works fine though so is this okay to ignore?

2) I’ve included a few plugins with no problems. However the last one I’m trying to use is the table plugin but nothing seems to work. I’ve read the documentation – http://tinymce.moxiecode.com/tinymce/docs/plugin_table.html and even searched their forums but I still get errors in my console with no table button showing up. Here is a basic snippet of code:

plugins : “contextmenu,ibrowser,divselect,advimage,table”,
theme_advanced_buttons2 : “link,tablecontrols…..”,

The problem happens with either the gzipped version or the regular version.

The problem seems to be in the calling of the plugin, not the “tablecontrols” button as I’ve excluded that to test.

The error in my javscript console is “tinymce.addplugin is not a function.”

Is this an issue with how tinymce is integrated into textpattern or an issue with my code?

Offline

#106 2006-04-14 01:51:57

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

Re: hak_tinymce WYSIWYG article editor

Did you update the tinyMCE version? They changed a bunch of internal stuff in 2.0.4 (my zip is still 2.0.2) I wonder if that has something to do with it.

Everything in my included tinyMCE is bone stock except for the iBrowser plugin so it would be safe to replace with the download from moxiecode. I’m working on making my version just a completely stock install so it can just be upgraded when moxiecode releases updates.


Shoving is the answer – pusher robot

Offline

#107 2006-04-14 03:28:39

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: hak_tinymce WYSIWYG article editor

I just updated the code and nothing has changed :| Not really sure what is going on here, I figured it was something with my way of implementing the plugin.

I’ll hack around some more I suppose.

Offline

#108 2006-04-14 12:22:41

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

Re: hak_tinymce WYSIWYG article editor

Not really sure what would cause this, it seems like it’s not finding all the files it needs, but there is nothing particularly odd about how it interacts with TXP most of the plugin is controls to turn textile on/off as the editor gets used.

Try removing iBrowser and see if the error goes away. That plugin is pretty old and no longer maintained so I’m wondering if could be causing the problem because of old syntax or something.

Last edited by hakjoon (2006-04-14 12:23:02)


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB