Browse Source

Merge pull request #1022 from tinymce/hotfix/FOPA-25

Updated format painter formats
pull/1023/head
Shikha 6 years ago
committed by GitHub
parent
commit
ce65f98f1d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      plugins/formatpainter.md

15
plugins/formatpainter.md

@ -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.
Loading…
Cancel
Save