|
|
@ -71,11 +71,16 @@ tinymce.init({ |
|
|
|
selector: 'textarea', // change this value according to your HTML |
|
|
|
plugins: 'formatpainter', |
|
|
|
formats: { |
|
|
|
borderstyle: { selector: 'td,th', styles: { borderTopStyle: '%valueTop', borderRightStyle: '%valueRight', borderBottomStyle: '%valueBottom', borderLeftStyle: '%valueLeft', }, remove_similar: true }, |
|
|
|
bordercolor: { selector: 'td,th', styles: { borderTopColor: '%valueTop', borderRightColor: '%valueRight', borderBottomColor: '%valueBottom', borderLeftColor: '%valueLeft' }, remove_similar: true }, |
|
|
|
backgroundcolor: { selector: 'td,th', styles: { backgroundColor: '%value' }, remove_similar: true }, |
|
|
|
formatpainter_checklist: { selector: 'ul', classes: 'tox-checklist' }, |
|
|
|
formatpainter_liststyletype: { selector: 'ul,ol', styles: { listStyleType: '%value' } }, |
|
|
|
formatpainter_borderstyle: { selector: 'td,th', styles: { borderTopStyle: '%valueTop', borderRightStyle: '%valueRight', borderBottomStyle: '%valueBottom', borderLeftStyle: '%valueLeft', }, remove_similar: true }, |
|
|
|
formatpainter_bordercolor: { selector: 'td,th', styles: { borderTopColor: '%valueTop', borderRightColor: '%valueRight', borderBottomColor: '%valueBottom', borderLeftColor: '%valueLeft' }, remove_similar: true }, |
|
|
|
formatpainter_backgroundcolor: { selector: 'td,th', styles: { backgroundColor: '%value' }, remove_similar: true }, |
|
|
|
formatpainter_removeformat: [ |
|
|
|
{ selector: 'b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins', remove: 'all', split: true, expand: false, block_expand: true, deep: true }, |
|
|
|
{ |
|
|
|
selector: 'b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins', |
|
|
|
remove: 'all', split: true, expand: false, block_expand: true, deep: true |
|
|
|
}, |
|
|
|
{ selector: 'span', attributes: ['style', 'class'], remove: 'empty', split: true, expand: false, deep: true }, |
|
|
|
{ selector: '*:not(tr,td,th,table)', attributes: ['style', 'class'], split: false, expand: false, deep: true } |
|
|
|
] |
|
|
@ -100,4 +105,4 @@ tinymce.init({ |
|
|
|
formatpainter_blacklisted_formats: 'link,address,removeformat,formatpainter_removeformat' |
|
|
|
}); |
|
|
|
``` |
|
|
|
Check out the [Format Painter demo]({{site.baseurl}}/demo/formatpainter/) to try out this new feature. |
|
|
|
Check out the [Format Painter demo]({{site.baseurl}}/demo/formatpainter/) to try out this new feature. |