UEditor solve the div tag into the p tag issues

The good page design layout html code uploaded to the database, and then read out, it was found that all the div tags have been replaced p.

Solution:

First search allowDivTransToP in ueditor.all.js file, locate the following code, will be true to false

 me.setOpt({
        'allowDivTransToP':false,
        'disabledTableInTable':true
    });

Then search documents in ueditor.config.js allowDivTransToP, find the following code, and remove the annotation to false

        // default filter rules related configuration items 
        //, disabledTableInTable: true // prohibit nested tables 
        , allowDivTransToP: false // allowed to enter the editor div tag label automatically becomes p 
        //, rgb2Hex: true // default output automatic color data into hexadecimal format from the format rgb

Guess you like

Origin www.cnblogs.com/surplus/p/11299051.html