chrjoh88
chrjoh88

Reputation: 27

Tinymce and html content not keeps code the same

I've trying to insert for ex. this code to get googlemaps in my webpage that i changes whole site in tinymce.

  <div id="g-map">
    <div class="container-fluid">
        <div class="row">
            <div id="map"></div>
        </div>
    </div>
</div>

But what I get is this <div id="g-map">&nbsp;</div> any idé why that happens? I've got no clue so far tested changing htmlentitles to htmlspecial char when saving nothing seems to matter.

This is my tinymce.init options the get it to include javascript also

mode : "specific_textareas",
editor_selector : "editor",
relative_urls : false,
remove_script_host : false,
document_base_url : "http://localhost",
allow_script_urls: true,
remove_script_host : false,
convert_urls : true,
extended_valid_elements : "script[src|type|language]",
height: 500,

Upvotes: 0

Views: 79

Answers (2)

In html Entities NBSP represents a non-breaking space, also known as a empty space.

Also, I recommended you try this better editor: CK Editor. I think is the better than Tiny MCE.

Upvotes: 0

chrjoh88
chrjoh88

Reputation: 27

Sorry all that read this! As usually, after 1 hour of trying to sort it out, I took a break and found this gem as an answer valid_elements : '*[*]'. Hope that may help someone else at least.

Upvotes: 1

Related Questions