Editor Error in Custom Module

PatriaCo
PatriaCo
@the-patria-company
4 years ago
349 posts
I am using a cloned version of jrTracker. We need the description to use the full editor not just a textarea, but the editor continues to strip all the formatting.

The original description code, in the index.php, looked like this for both the _create and _update functions:
    // Text
    $_tmp = array(
        'name'     => 'project_text',
        'label'    => 4,
        'help'     => 5,
        'type'     => 'textarea',
        'validate' => false,
        'required' => true
    );
    // See if we are allowing BBCode
    if (strpos($_user['quota_jrCore_active_formatters'], 'format_string_bbcode')) {
        $_tmp['sublabel'] = 48;
    }
    jrCore_form_field_create($_tmp);

I changed the code to support the editor in both areas, as follows:

    // Text
    $_tmp = array(
        'name'     => 'project_text',
        'label'    => 4,
        'help'     => 5,
        'type'     => 'editor',
        'validate' => 'allowed_html',
        'required' => true
    );
    jrCore_form_field_create($_tmp);

Any thoughts as to why the editor is still stripping the formatting?


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 06/28/20 10:12:58AM
PatriaCo
PatriaCo
@the-patria-company
4 years ago
349 posts
Is there a _feature or something I need to load in the include.php for the editor to work correctly?


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
douglas
@douglas
4 years ago
2,767 posts
PatriaCo:
Is there a _feature or something I need to load in the include.php for the editor to work correctly?

Not that I'm aware of.

You might check that the format that is being stripped is allowed in the "Allowed HTML" field in your jrCore quota config section.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

Tags