You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tubin gen <fa...@gmail.com> on 2009/04/20 16:50:25 UTC

tinymce textarea

I am trying to make my text editor (text area )  to rich text eitors
  using timymce.First I tried wicket timymce behaviour , the problem
is the  tinymce java scriopt is repalce my textarea html with an
iframe


this  is my html , but the   style="display: none;" is added by tinymce
<textarea maxlength="4000" cols="120" rows="8"
name="reassignmentComments" wicket:id="reassignmentComments"
id="reassignmentComments" style="display: none;"/>

and code generated by tinymce is   lot,  but the problem is it uses
iframe and because of  which the textarea value is not posted to my
form   , please help me integrating tinymce

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by jcgarciam <jc...@gmail.com>.
Agreed with @Jeremy,

I have used to TinyMCE myself to update a CLOB fields mapped to my Entity
Object and its value get submitted like a charm, but i remember seen this
problem in my project a while before, when the form was submitted using
Ajax, since i didn't make too much research i just switch to normal
SubmitLink and the problem was resolved. 



Jeremy Thomerson-5 wrote:
> 
> I think TinyMCE always uses an iframe - because it loads an editable
> document in it.  I don't think that's your problem.  Show us all of the
> relevant code (your java and html code).
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Mon, Apr 20, 2009 at 9:50 AM, tubin gen <fa...@gmail.com> wrote:
> 
>> I am trying to make my text editor (text area )  to rich text eitors
>>  using timymce.First I tried wicket timymce behaviour , the problem
>> is the  tinymce java scriopt is repalce my textarea html with an
>> iframe
>>
>>
>> this  is my html , but the   style="display: none;" is added by tinymce
>> <textarea maxlength="4000" cols="120" rows="8"
>> name="reassignmentComments" wicket:id="reassignmentComments"
>> id="reassignmentComments" style="display: none;"/>
>>
>> and code generated by tinymce is   lot,  but the problem is it uses
>> iframe and because of  which the textarea value is not posted to my
>> form   , please help me integrating tinymce
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/tinymce-textarea-tp23138273p23138719.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by fachhoch <fa...@gmail.com>.

here my code for textarea

public class CustomTextArea<T> extends TextArea<T> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static final AttributeModifier  rows=new
AttributeModifier("rows",true, new Model<String>("8"));

	public static final AttributeModifier  cols=new
AttributeModifier("cols",true, new Model<String>("120"));

	public static final AttributeModifier  maxlength=new
AttributeModifier("maxlength",true, new Model<String>("4000"));

	
	public CustomTextArea(String id) {
		super(id);
		add(rows);
		add(cols);
		add(maxlength);
		add(new AuditBehaviour.TextAreaBeahaviour());
	}
	
	
	
}


code for  AuditBehaviour.TextAreaBeahaviour()

    public static class TextAreaBeahaviour  extends  JQueryBehavior{
    	@Override
    	public void renderHead(IHeaderResponse response) {
    		super.renderHead(response);
    		response.renderJavascriptReference(TEXTAREA_MAX_LENGTH);
    		response.renderJavascriptReference(TINY_MCE);
    	
response.renderJavascript(((AuditWicketApplication)Application.get()).getTextAreaMaxLengthScript(),
null); 
    	
response.renderJavascript(((AuditWicketApplication)Application.get()).getTinymceScript(),
null); 
    	}
    }

scripts 

for max length i am using jquery   maxlength validation

						jQuery(document).ready(function($) {
					        	 //Set maxlength of all the textarea (call plugin)
					        	 $().maxlength();
						})


for text area

inyMCE.init({ mode : "textareas" });  

 and as the later guy suggested I am using ajaxlink to submit my form  does 
ajaxlink has any issues with tinynmce ?
and when form is posted the my model get updated with   <p><br
mce_bogus="1"></p>  and not the actual text   









Jeremy Thomerson-5 wrote:
> 
> I think TinyMCE always uses an iframe - because it loads an editable
> document in it.  I don't think that's your problem.  Show us all of the
> relevant code (your java and html code).
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Mon, Apr 20, 2009 at 9:50 AM, tubin gen <fa...@gmail.com> wrote:
> 
>> I am trying to make my text editor (text area )  to rich text eitors
>>  using timymce.First I tried wicket timymce behaviour , the problem
>> is the  tinymce java scriopt is repalce my textarea html with an
>> iframe
>>
>>
>> this  is my html , but the   style="display: none;" is added by tinymce
>> <textarea maxlength="4000" cols="120" rows="8"
>> name="reassignmentComments" wicket:id="reassignmentComments"
>> id="reassignmentComments" style="display: none;"/>
>>
>> and code generated by tinymce is   lot,  but the problem is it uses
>> iframe and because of  which the textarea value is not posted to my
>> form   , please help me integrating tinymce
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/tinymce-textarea-tp23138273p23145724.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by Jeremy Thomerson <je...@wickettraining.com>.
I think TinyMCE always uses an iframe - because it loads an editable
document in it.  I don't think that's your problem.  Show us all of the
relevant code (your java and html code).

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Apr 20, 2009 at 9:50 AM, tubin gen <fa...@gmail.com> wrote:

> I am trying to make my text editor (text area )  to rich text eitors
>  using timymce.First I tried wicket timymce behaviour , the problem
> is the  tinymce java scriopt is repalce my textarea html with an
> iframe
>
>
> this  is my html , but the   style="display: none;" is added by tinymce
> <textarea maxlength="4000" cols="120" rows="8"
> name="reassignmentComments" wicket:id="reassignmentComments"
> id="reassignmentComments" style="display: none;"/>
>
> and code generated by tinymce is   lot,  but the problem is it uses
> iframe and because of  which the textarea value is not posted to my
> form   , please help me integrating tinymce
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: tinymce textarea

Posted by Swanthe Lindgren <sw...@megasol.se>.
I suggest that you display the text in a read only tinymce text area.

TinyMCESettings mceSettings = new TinyMCESettings(Theme.advanced);
mceSettings.addCustomSetting("readonly:true");

This only works if you update the tinymce javascripts as in  
http://www.nabble.com/Re%3A-making-tinymce-textarea-read-only-p23170821.html

fachhoch wrote:
> Tinymce text is formatted with html and when I add text to label i  see the 
> text with html , please tell me how can I tell wicket   that model also has
> html tags and browser should interpet them and   not display ?  If I set
> model of a 
> label as html text   I   am expecting to see    html parsed by browser  and
> not the same html I set as model 
> attached is the image   , it shows the same text i sert as model and i am
> expecting browser to parse those html tags and not just display , please
> help me how to acheieve this ?
> \
> Linkan wrote:
>   
>>  http://www.nabble.com/file/p23175527/textarea-read-only.png   
>>
>>
>> What you get out and put in tinymce is html, so why not continue with 
>> pre tags? Or perhaps put it in a div tag with some style, like 
>> "border-left: 2px solid blue; padding-left: 5px;".
>>
>> //Swanthe
>>
>> fachhoch wrote:
>>     
>>> It worked , that's good, need one more suggestion , Usually without
>>> tinymce
>>> we show comments  to display  inside a pre tag  to retain the line breaks
>>> etc , but in case of tinymce   what's the best  way to display comments  
>>> ?
>>>
>>>
>>> Linkan wrote:
>>>   
>>>       
>>>> Try add TinyMceAjaxSubmitModifier to your submit button
>>>>
>>>> //Swanthe
>>>>
>>>>     
>>>>         
>>
>>     
>>>> tubin gen wrote:
>>>>     
>>>>         
>>>>> I am trying to make my text editor (text area )  to rich text eitors
>>>>>   using timymce.First I tried wicket timymce behaviour , the problem
>>>>> is the  tinymce java scriopt is repalce my textarea html with an
>>>>> iframe
>>>>>
>>>>>
>>>>> this  is my html , but the   style="display: none;" is added by tinymce
>>>>> <textarea maxlength="4000" cols="120" rows="8"
>>>>> name="reassignmentComments" wicket:id="reassignmentComments"
>>>>> id="reassignmentComments" style="display: none;"/>
>>>>>
>>>>> and code generated by tinymce is   lot,  but the problem is it uses
>>>>> iframe and because of  which the textarea value is not posted to my
>>>>> form   , please help me integrating tinymce
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by fachhoch <fa...@gmail.com>.
Tinymce text is formatted with html and when I add text to label i  see the 
text with html , please tell me how can I tell wicket   that model also has
html tags and browser should interpet them and   not display ?  If I set
model of a 
label as html text   I   am expecting to see    html parsed by browser  and
not the same html I set as model 
attached is the image   , it shows the same text i sert as model and i am
expecting browser to parse those html tags and not just display , please
help me how to acheieve this ?
\
Linkan wrote:
>  http://www.nabble.com/file/p23175527/textarea-read-only.png   
> 
> 
> What you get out and put in tinymce is html, so why not continue with 
> pre tags? Or perhaps put it in a div tag with some style, like 
> "border-left: 2px solid blue; padding-left: 5px;".
> 
> //Swanthe
> 
> fachhoch wrote:
>> It worked , that's good, need one more suggestion , Usually without
>> tinymce
>> we show comments  to display  inside a pre tag  to retain the line breaks
>> etc , but in case of tinymce   what's the best  way to display comments  
>> ?
>>
>>
>> Linkan wrote:
>>   
>>> Try add TinyMceAjaxSubmitModifier to your submit button
>>>
>>> //Swanthe
>>>
>>>     
> 
> 
> 
>>> tubin gen wrote:
>>>     
>>>> I am trying to make my text editor (text area )  to rich text eitors
>>>>   using timymce.First I tried wicket timymce behaviour , the problem
>>>> is the  tinymce java scriopt is repalce my textarea html with an
>>>> iframe
>>>>
>>>>
>>>> this  is my html , but the   style="display: none;" is added by tinymce
>>>> <textarea maxlength="4000" cols="120" rows="8"
>>>> name="reassignmentComments" wicket:id="reassignmentComments"
>>>> id="reassignmentComments" style="display: none;"/>
>>>>
>>>> and code generated by tinymce is   lot,  but the problem is it uses
>>>> iframe and because of  which the textarea value is not posted to my
>>>> form   , please help me integrating tinymce
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>   
>>>>       
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/tinymce-textarea-tp23138273p23175527.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by Swanthe Lindgren <sw...@megasol.se>.
What you get out and put in tinymce is html, so why not continue with 
pre tags? Or perhaps put it in a div tag with some style, like 
"border-left: 2px solid blue; padding-left: 5px;".

//Swanthe

fachhoch wrote:
> It worked , that's good, need one more suggestion , Usually without tinymce
> we show comments  to display  inside a pre tag  to retain the line breaks
> etc , but in case of tinymce   what's the best  way to display comments   ?
>
>
> Linkan wrote:
>   
>> Try add TinyMceAjaxSubmitModifier to your submit button
>>
>> //Swanthe
>>
>>     



>> tubin gen wrote:
>>     
>>> I am trying to make my text editor (text area )  to rich text eitors
>>>   using timymce.First I tried wicket timymce behaviour , the problem
>>> is the  tinymce java scriopt is repalce my textarea html with an
>>> iframe
>>>
>>>
>>> this  is my html , but the   style="display: none;" is added by tinymce
>>> <textarea maxlength="4000" cols="120" rows="8"
>>> name="reassignmentComments" wicket:id="reassignmentComments"
>>> id="reassignmentComments" style="display: none;"/>
>>>
>>> and code generated by tinymce is   lot,  but the problem is it uses
>>> iframe and because of  which the textarea value is not posted to my
>>> form   , please help me integrating tinymce
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>   
>>>       
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by fachhoch <fa...@gmail.com>.
It worked , that's good, need one more suggestion , Usually without tinymce
we show comments  to display  inside a pre tag  to retain the line breaks
etc , but in case of tinymce   what's the best  way to display comments   ?


Linkan wrote:
> 
> Try add TinyMceAjaxSubmitModifier to your submit button
> 
> //Swanthe
> 
> 
> tubin gen wrote:
>> I am trying to make my text editor (text area )  to rich text eitors
>>   using timymce.First I tried wicket timymce behaviour , the problem
>> is the  tinymce java scriopt is repalce my textarea html with an
>> iframe
>>
>>
>> this  is my html , but the   style="display: none;" is added by tinymce
>> <textarea maxlength="4000" cols="120" rows="8"
>> name="reassignmentComments" wicket:id="reassignmentComments"
>> id="reassignmentComments" style="display: none;"/>
>>
>> and code generated by tinymce is   lot,  but the problem is it uses
>> iframe and because of  which the textarea value is not posted to my
>> form   , please help me integrating tinymce
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/tinymce-textarea-tp23138273p23157424.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: tinymce textarea

Posted by Swanthe Lindgren <sw...@megasol.se>.
Try add TinyMceAjaxSubmitModifier to your submit button

//Swanthe


tubin gen wrote:
> I am trying to make my text editor (text area )  to rich text eitors
>   using timymce.First I tried wicket timymce behaviour , the problem
> is the  tinymce java scriopt is repalce my textarea html with an
> iframe
>
>
> this  is my html , but the   style="display: none;" is added by tinymce
> <textarea maxlength="4000" cols="120" rows="8"
> name="reassignmentComments" wicket:id="reassignmentComments"
> id="reassignmentComments" style="display: none;"/>
>
> and code generated by tinymce is   lot,  but the problem is it uses
> iframe and because of  which the textarea value is not posted to my
> form   , please help me integrating tinymce
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org