Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

wysiwyg editor Rate Topic   - - - - -

 
  • beta
  • Member
  • Trial users
  • Join Date: 18-Oct 11
  • 44 posts

Posted 18 June 2017 - 09:56 AM #21

You see the "Replay to this topic" wysiwyg editor, please.

click in the textarea container and onload wysiwyg editor! :-)

In most cases, the editor is not needed in the category and product detailed page. it's true?

good idea for admin panel cm-wysiwyg textarea.

how to performance with using and edit "core.js" or jquery?



 
  • pradeesh_72
  • Member
  • Trial users
  • Join Date: 15-Nov 17
  • 45 posts

Posted 09 June 2018 - 11:47 AM #22

Well, there has to be a siimple answer. One of my clients wanted the wysiwyg editor on a textarea in their admin. It was eays to add cm-wsiwyg to the class and viola, the editor appeared.

However, when i put two lines like
Test line 1

Test line 2

The HTML shows as two paragraphs (what is expected) but when the data is POSTED it comes into the controller as 2 newline separated lines versus the two html paragraphs.

So what's the trick to getting it to POST html code so that the editor is useful? I must be missing something.

The textara tag looks like:

<textarea id="big_commentr" name="big_comment" cols="55" rows="8" class="cm-wysiwyg input-textarea-long">
  {$big_comment}
</textarea>
But when $_REQUEST['big_comment'] is received in the controller the string is "Test line 1\nTest line 2" where it should be "<p>Test line 1</p><p>Test line 2</p>".

 

Use fn_trusted_vars.



 
  • add1ctiv3
  • Newbie
  • Trial users
  • Join Date: 23-Sep 18
  • 2 posts

Posted 01 November 2018 - 08:53 AM #23

Hello, I realize this is an old thread, but I can not find the answer anywhere else. I need to use a text editor in a backend add on page and while I add the class 'cm-wysiwyg'  to my textarea, nothing seems to happen. I clear the cache of course. When I try to do the same to the orders page for example, it works fine but not in my custom addon page. I believe its a js file not being included but I honestly dont know. Here is my page code for reference.

{capture name="mainbox"}

    {include file="common/subheader.tpl" title="{__("tb_settings_subheader_1")}"}

    <div class="taxydromikh-settings-block-container">

        <div class="taxydromikh-input-container">
            <!-- Username -->
            <label>{__("tb_settings_api_username_label")}</label>
            <input id="tb-api-username-input" class="form-control" type="text" placeholder="{__("tb_settings_api_username_placeholder")}" />
        </div>

        <div class="taxydromikh-input-container">
            <!-- Password -->
            <label>{__("tb_settings_api_password_label")}</label>
            <input id="tb-api-password-input" class="form-control" type="text" placeholder="{__("tb_settings_api_password_placeholder")}" />
        </div>

        <div class="taxydromikh-input-container">
            <!-- App Key -->
            <label>{__("tb_settings_api_key_label")}</label>
            <input  id="tb-api-key-input" class="form-control" type="text" placeholder="{__("tb_settings_api_key_placeholder")}" />
        </div>

    </div>

    <div class="taxydromikh-settings-block-container">

        <div class="taxydromikh-input-container">
            <label>{__("tb_settings_api_mode_label")}</label>
            <div class="tg-list-item">
                <input class="tgl tgl-skewed" id="tb-api-mode-checkbox" type="checkbox"/>
                <label style="width:7em;" title="{__("tb_settings_api_mode_title")}" class="tgl-btn" data-tg-off="{__("tb_settings_api_test_mode_text")}" data-tg-on="{__("tb_settings_api_live_mode_text")}" for="tb-api-mode-checkbox"></label>
            </div>
        </div>

        <div class="taxydromikh-input-container" style="margin-top:13px;">
            <!-- Taxydromiki test Link -->
            <label>{__("tb_settings_api_test_link_label")}</label>
            <input value="http://testvoucher.taxydromiki.gr/JobServices.asmx" id="tb-api-test-url-input" class="form-control" type="text" placeholder="{__("tb_settings_api_test_link_placeholder")}" />
        </div>

        <div class="taxydromikh-input-container">
            <!-- Taxydromiki live Link -->
            <label>{__("tb_settings_api_live_link_label")}</label>
            <input value="https://voucher.taxydromiki.gr/JobServices.asmx" id="tb-api-live-url-input" class="form-control" type="text" placeholder="{__("tb_settings_api_live_link_placeholder")}" />
        </div>

    </div>

    <div class="taxydromikh-settings-block-container">
        <div class="taxydromikh-input-container">
            <!-- Taxydromiki tracking website url -->
            <label>{__("tb_settings_tracking_url_label")}</label>
            <input value="https://www.taxydromiki.com/track" id="tb-tracking-url-input" class="form-control" type="text" placeholder="{__("tb_settings_tracking_url_placeholder")}" />
        </div>
    </div>

    <div class="tb-hr clearfix">&nbsp;</div>

    {include file="common/subheader.tpl" title="{__("tb_settings_subheader_2")}"}

    <div class="taxydromikh-settings-block-container">

        <div class="taxydromikh-input-container">
            <label>{__("tb_settings_close_function_label")}</label>
            <div class="tg-list-item">
                <input checked class="tgl tgl-skewed" id="tb-close-activation" type="checkbox"/>
                <label style="width:6em;" class="tgl-btn" data-tg-off="{__("tb_settings_off_text")}" data-tg-on="{__("tb_settings_on_text")}" for="tb-close-activation"></label>
            </div>
        </div>

    </div>

    <div class="taxydromikh-settings-block-container">

        <div class="taxydromikh-input-container">
            <label>{__("tb_settings_synch_function_label")}</label>
            <div class="tg-list-item">
                <input class="tgl tgl-skewed" id="tb-synch-activation" type="checkbox"/>
                <label style="width:6em;" class="tgl-btn" data-tg-off="{__("tb_settings_off_text")}" data-tg-on="{__("tb_settings_on_text")}" for="tb-synch-activation"></label>
            </div>
        </div>

    </div>

    <div class="tb-hr clearfix">&nbsp;</div>

    {include file="common/subheader.tpl" title="{__("tb_settings_subheader_3")}"}

    
    
    <textarea class="cm-wysiwyg"></textarea>




{/capture}

{capture name="sidebar"}

    <div id="taxydromikh-sidebar-logo-container" class="taxydromikh-float-block sidebar-row">
        <img src="design/backend/media/images/addons/taxydromikh_bridge/geniki.png" />
    </div>

    <hr>

{/capture}

{capture name="adv_buttons"}
    <div class="btn btn-primary">{__("tb_save_settings_button_text")}</div>
{/capture}

{include file="common/mainbox.tpl" title="{__('taxydromikh_bridge')}" content=$smarty.capture.mainbox adv_buttons=$smarty.capture.adv_buttons select_languages=true buttons=$smarty.capture.buttons sidebar=$smarty.capture.sidebar}

{script src="js/addons/taxydromikh_bridge/taxydromikh_bridge_settings.js"}

Could you please point out my mistake? I am currently testing this on version 4.2.4.

 

Thanks in advance