简体   繁体   中英

How to prevent the froala editor to format my code view html?

i am using froala editor, however when i put this html code in the code view

<td><a href="https://www.facebook.com/GSCinemas/videos/10155007044777275/" target="_blank"><img src="http://edm.gsc.com.my/WebLITE/Applications/campaignmgmt/uploaded/pics/2017/gsc-edm-july2017/masthead-gsc30.jpg" width="280" height="110" alt="#GSC30" title="#GSC30" class="img-max" style="display:block;"></a></td>

it become,

<!DOCTYPE html>
<html>
    <head>
        <title></title>
    </head>
    <body style="min-height: 300px;">

        <p>
            <a href="https://www.facebook.com/GSCinemas/videos/10155007044777275/" target="_blank"><img src="http://edm.gsc.com.my/WebLITE/Applications/campaignmgmt/uploaded/pics/2017/gsc-edm-july2017/masthead-gsc30.jpg" width="280" height="110" alt="#GSC30" title="#GSC30" class="img-max fr-fil fr-dib"></a>
        </p>
    </body>
</html>

i dont want it to help me to format anything, how can i disable the froala editor to format anything for me?

It looks like you are using the fullPage option: https://www.froala.com/wysiwyg-editor/docs/options#fullPage . When this option is used, the editor is automatically adding HTML , HEAD and BODY tags.

To disable wrapping the a with P tags, you should also turn the enter option to $.FroalaEditor.ENTER_BR : https://www.froala.com/wysiwyg-editor/docs/options#enter .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM