Hallo Barry...

I want to ask, are these required to load or just optional for support ajax

<script>// Load external
pluginstinymce.PluginManager.load('imagemanager',
'/external/imagemanager/editor_plugin_src.js');tinymce.PluginManager.load('filemanager',
'/external/filemanager/editor_plugin_src.js');tinymce.PluginManager.load('spellchecker',
'/external/spellchecker/editor_plugin_src.js');</script>


because from the fiddle http://fiddle.tinymce.com/Pncaab are included

In my code they don't exists, but work with twice variable for
product_description.

My init TinyMce:

<script type="text/javascript">
 tinyMCE.init({
        // General options
      //  mode : "none",
              mode : "textareas",
            theme : "advanced",
             height: "320",
             width: "380",
            relative_urls : false,
            plugins : "table,inlinepopups,preview,fullscreen",

        // Theme options
        theme_advanced_buttons1 :
"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,table,removeformat,code,|,bullist,numlist,|,blockquote",
        theme_advanced_buttons2 :
"hr,visualaid,|,tablecontrols,|,fullscreen",
        theme_advanced_buttons3 : "",
        theme_advanced_buttons4 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : false

});

I wonder why your code work perfectly but my code need more conditional :),
I use with bootstrap twitter too.

What more required to do run correctly?

Last experiment I get that when I put submit button in the form work
perfectly but when I put submit button out the form and call onclick
('#form_edit_products').submit();return false; it is need the conditional
like before.

:)


On Wed, Oct 17, 2012 at 12:38 PM, Saiful Amri <[email protected]> wrote:

> Hallo...
>
> When try using ajax and TinyMce, I got problem that is the content from
> editor is read but does not update. so use code like this to be update is
> read by post.
>
>
> $('#form_edit_products').live("submit", function(e){
>               e.preventDefault();
>               $("#loading_top").css({"display":"block"});
>               if (working) return false;
>                   working = true;
>
>               // Using our storePOST wrapper method to send data
>               // via a POST AJAX request:
>               var product_description =
> tinyMCE.get('product_description');
>                       product_description =
> encodeURIComponent(product_description.getContent());
>               var data =
> $(this).serialize()+'&product_description='+product_description;
>               $.storePOST(url, 'submitProduct', data, function(r){
>
>                   r.payload.script.replace(new RegExp( "\r\n", "g" ),
> r.payload.script);
>
>                   $("#info-message").html(r.payload.html);
>
>                   $.globalEval(r.payload.script);
>
>                    $("#loading_top").fadeOut('normal');
>                   working = false;
>                   return false;
>               });
>                   working = false;
>                   $("html, body").animate({scrollTop:100}, 'slow');
>               return false;
>           });
>
>
> Please, look at field product_description I use this twice because in
> $(this).serialize() product_description read old content. so add
> encodeURIComponent(product_description.getContent()) one more to be read
> last update content from editor of tinyMce.
>
> This is result from firebug
>
> media_cover 6872options_color[]Black options_color[]Dark Blue
> options_color[]Redoptions_color[] Whiteoptions_color[]Brown
> options_color[]Gray options_color[]
> options_name[]
> options_size[]Loptions_size[]
> options_value[]
> product_brand
> product_category[]100 product_category[]117 product_category[]118
> product_code RG501*product_description**<p>Test</p>* *product_description*
> *<p>Test</p> <p>Test Updated</p>*product_discount_price 0.00product_height
> 0.00 product_id15035product_length 0.00product_media_id[]6872
> product_media_id[]6873 product_media_id[]6874product_name Kaos Vintage -
> RG501
>
> Look at bold, the first product_description is from form.serialize() and
> the second from var data = 
> $(this).serialize()+'&*product_description='+product_description
>
>
> *Thanks
>
> Best Regards
>
> Saiful Amri
>
> **
>
> On Tue, Oct 16, 2012 at 8:12 PM, Saiful Amri <[email protected]>wrote:
>
>> Good, now I got it and I understand how to save a content of tinyMce
>> Editor.
>>
>> Furthermore, I am sorry it is a little out of TB thread. I want to know,
>> is there any way to call tinyMce editor using ajax without refresh page? it
>> still fail to display editor of tinyMce in a div using ajax directly, the
>> editor is no displayed. But when without ajax it is good displayed.
>>
>> thanks...
>>
>> Best Regards
>>
>> Saiful Amri
>>
>>
>>
>> On Tue, Oct 16, 2012 at 7:48 PM, Barry vd. Heuvel <[email protected]>wrote:
>>
>>> the timeout is not needed, see this fiddle:
>>> http://fiddle.tinymce.com/Nncaab
>>>
>>> Or the jQuery version: http://fiddle.tinymce.com/Pncaab (ajax is
>>> commented out, but something like that should work)
>>>
>>> Anyways, good luck ;)
>>>
>>>
>>> On Tue, Oct 16, 2012 at 12:20 PM, Saiful Amri <[email protected]>wrote:
>>>
>>>> I have tried using ajax like your function for the first time using
>>>> tinyMce or FckEditor (now CKeditor) but both worked on second submit, not
>>>> on first submit form data. So, I decided not using ajax even thought I am
>>>> interested using with ajax.
>>>>
>>>> Now, I found the solution from you and all.
>>>>
>>>> When look at the source code of the demo on tinyMce about this ajax. I
>>>> think that why data just saved on second submit, it needs setTimeout to get
>>>> content.
>>>>
>>>> Thanks, I will update my source code and using it.
>>>>
>>>> Best Regards
>>>>
>>>> Saiful Amri
>>>>
>>>>
>>>>
>>>> On Tue, Oct 16, 2012 at 4:57 PM, Barry vd. Heuvel 
>>>> <[email protected]>wrote:
>>>>
>>>>> Not sure, I have been using for years.
>>>>>
>>>>> First, you had to use triggersave, before saving, but for atleast 1
>>>>> year, I just do
>>>>> $.post(url, form.serialize(), function (data){..}
>>>>> and it works fine..
>>>>>
>>>>> On Tue, Oct 16, 2012 at 4:36 AM, Saiful Amri <[email protected]>wrote:
>>>>>
>>>>>> Hallo Barry...
>>>>>>
>>>>>> Awesome! Barry, that is what I mean. Last time ( I use Version 3.5b2
>>>>>> (2012-03-15), now Version: 3.5.7)  when I google about that AJAX
>>>>>> Compatible, I didn't found demo about it, and in TinyMce demo page too.
>>>>>>
>>>>>> So long time, I didn't visit TinyMce, is that new demo and
>>>>>> compatibility? when it is added by TinyMce?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>>
>>>>>> Best Regards
>>>>>>
>>>>>> Saiful Amri
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 16, 2012 at 3:37 AM, Barry vd. Heuvel <[email protected]
>>>>>> > wrote:
>>>>>>
>>>>>>> Why not? There is an example for ajax save/load;
>>>>>>> http://www.tinymce.com/tryit/ajax_load_save.php
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Oct 15, 2012 at 9:58 PM, Saiful Amri 
>>>>>>> <[email protected]>wrote:
>>>>>>>
>>>>>>>> Hello...
>>>>>>>>
>>>>>>>> Thank you for all of your answers, I mean that, how to using editor
>>>>>>>> for web like TinyMCE or other editors in BT that support ajax when 
>>>>>>>> save the
>>>>>>>> content of editor into a database in add or edit operation of a 
>>>>>>>> content. I
>>>>>>>> found that TinyMCE or CKeditor does not support saving directly using 
>>>>>>>> ajax
>>>>>>>> without refresh page. Maybe, they are using Iframe on background 
>>>>>>>> editor, so
>>>>>>>> we ca not save a content using ajax directly, the content can not be 
>>>>>>>> read
>>>>>>>> when saving into a database.
>>>>>>>>
>>>>>>>>
>>>>>>>> thanks
>>>>>>>>
>>>>>>>> Best Regards
>>>>>>>>
>>>>>>>> Saiful Amri
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Oct 16, 2012 at 12:03 AM, Barry Carlyon <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> I don't think he was after a offline html editor/programmer/dev
>>>>>>>>> environment.
>>>>>>>>>
>>>>>>>>> But after something like TinyMCE that WordPress uses for its post
>>>>>>>>> editor...
>>>>>>>>>
>>>>>>>>> I could be wrong tho. Original post is a little unclear really.
>>>>>>>>>
>>>>>>>>> Sent from my iPad
>>>>>>>>>
>>>>>>>>> On 15 Oct 2012, at 17:54, Eric Fookes <[email protected]> wrote:
>>>>>>>>>
>>>>>>>>> If you're using Windows, you might like to give NoteTab a try.
>>>>>>>>> It's currently the only code-based HTML editor that supports 
>>>>>>>>> Bootstrap (v
>>>>>>>>> 2.1.1).
>>>>>>>>>
>>>>>>>>> Building a Bootstrap page with NoteTab is really easy. First open
>>>>>>>>> the included Bootstrap Clip library in NoteTab and then drag-and-drop
>>>>>>>>> Bootstrap snippets into your document. Most of these pop up a dialog 
>>>>>>>>> box
>>>>>>>>> that lets you select options and fill-in fields before the completed 
>>>>>>>>> code
>>>>>>>>> is pasted in your page. You'll find more details and some screenshots 
>>>>>>>>> here:
>>>>>>>>>
>>>>>>>>> http://www.notetab.com/html-editor.php#Clips
>>>>>>>>>
>>>>>>>>> NoteTab is available in several editions, including a free one
>>>>>>>>> called NoteTab Light.
>>>>>>>>>
>>>>>>>>> Full disclosure: we are the developers of NoteTab.
>>>>>>>>>
>>>>>>>>> On Monday, March 26, 2012 4:02:16 PM UTC+2, Saiful Amri wrote:
>>>>>>>>>>
>>>>>>>>>> Hello, Is there any suitable editor for bootstraps?
>>>>>>>>>>
>>>>>>>>>> I have been tried tinyeditor, but it does not support ajax for
>>>>>>>>>> calling editor...
>>>>>>>>>>
>>>>>>>>>> Wysiwyg editor good, but still bad in design....
>>>>>>>>>>
>>>>>>>>>> Btw, how to post something using ajax + Wysiwyg?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to