Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7658855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:15:22+00:00 2026-05-31T13:15:22+00:00

I am using TinyMCE for my PHP/CodeIgniter CMS back-end input. However when I use

  • 0

I am using TinyMCE for my PHP/CodeIgniter CMS back-end input. However when I use a text color, some of codes are not saved and does not show the correct color.

How can I solve this problem?

Thanks in advance.

<span style="color: #ff00ff;">Some text</span>

becomes

<span  #ff00ff;">Some text</span>

in database


Some codes are here.

In my controller.

function _fields()
{
    $data = array(
       ....
        'content'          => $_POST['content'],
        ....
    );
    return $data;
}


function create()
{
    // We need TinyMCE, so load it
    $this->bep_assets->load_asset_group('TINYMCE');
    ...
    if ($this->input->post('name'))
    {
        $data = $this->_fields();
        $this->MKaimonokago->addItem($this->module,$data);
...

And in my model.

function addItem($module,$data,$return_id=FALSE)
{
    $module_table = 'omc_'.$module;
    ...
    $this->db->insert($module_table, $data);
    ...
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:15:23+00:00Added an answer on May 31, 2026 at 1:15 pm

    With CodeIgniter, if you have the XSS filter enabled globally (set in your config.php) you will find that HTML inline style text is removed from all form inputs.

    To get around this you can disable global XSS filtering and filter your TinyMCE form inputs manually with something like HTML Purifier, which gives you a lot more control over the elements and attributes which you would like to allow.

    For the rest of your form inputs you can still run them through CodeIgniter’s XSS filter – you’ll just have to do it manually, like so:

    $this->form_validation->set_rules('form_item_name', 'Field Name', 'required|xss_clean|strip_tags|trim');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i posted some data using tinymce (in a symfony project).while retrieving back how can
I'm using TINYMCE text editor and if you use a double space the string
I need a mail function in my php project. I am using tinymce text
I`m using tinymce as text editor on my website. Sometimes when I wrote some
I am using TinyMCE Editor Extender and trying to show the text on clicking
I have three textareas using tinymce as text area. They all work in chrome
I'm currently using TinyMCE as html editor for users of my CMS. Somehow the
I have a Django form using textareas and TinyMCE for text entry. I would
i am using facebox (a jquery modal plug-in) and tinymce for my textboxes. however
I'm using TinyMCE and want to execute a php script get the output and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.