tinymce stopped working.

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

tinymce stopped working.

#1

Postby xren » Fri May 17, 2013 3:25 pm

Hi,

I have a tinymce defined with a text area, suddenly, after added another text field to the form, the tinymce stopped working: it can display the initial value bind with a DB resource. but when changed anything, the changes would not bind to the field then to the DB - saving action, then the old value comes back.

How this can be fixed?

Thank you for any suggestion.

Xiaoli
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#2

Postby Wai » Tue May 21, 2013 8:26 am

Hi Xiaoli,

Not sure how you are applying the TinyMCE editor but it should apply to all text areas or you can use a class.

Your post is not very clear.

You mention that when you do an update to a database resource, it is not updating the changed value back to the database? Does it work when you only have one text area field.

You mention that the TinyMCE stops working when you add another text field to the form. This should not be the case.

Here is an example of initializing text areas with TinyMCE:

Code: Select all

$(document).ready(function() {
	
	$('textarea.tinymce').tinymce({
		// Location of TinyMCE script
		script_url : 'shared/tinymce/jscripts/tiny_mce/tiny_mce.js',

		// General options
		theme : "advanced",
		plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,nonbreaking,xhtmlxtras,template,advlist",
		file_browser_callback : "filebrowser",
		
		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull",
		theme_advanced_buttons2 : "styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons3 : "outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,code,|,insertdate,inserttime,preview,|,forecolor,backcolor,|,hr,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen,nonbreaking,template",
		theme_advanced_buttons4 : "",		

		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
	});
});
You can see from the example, it will apply TinyMCE to all text areas which have the class tinymce

The text areas on our page, we have then added into HTML Element Properties - Editor Input tab - Class property - "tinymce"

Doing this does not affect reading/writing to the database at all, it behaves as a normal form field.
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Tue May 21, 2013 2:20 pm

Hi Wai,

I added another text field. The purpose is that user can copied items from this text field to the text area.

I have the document ready function similar to your sample.

Then I found the textarea does not work with edit - the changed content cannot be bind to the field variable then cannot be saved to DB.

I checked online some one saying that this happen to then as well because the tinymce cannot handle copy and paste. They fixed by clean firefox cache, etc. But that does not work to me. And I don't know what is the reason for my problem yet - might be tinymce cannot handle copy/paste.

Thanks,
Xiaoli
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#4

Postby xren » Fri May 24, 2013 2:39 pm

Hi Wai,

I download the latest version of tinymce. It seems fine in IE8 and Google Chrome. But still not working well with firefox - some time it works but most time it does not.

Can you take a look for me? I can send you the code.

Thanks,
Xiaoli
0 x


Who is online

Users browsing this forum: No registered users and 10 guests