css - TinyMCE 4 - add custom styles/classes/attributes to any HTML tag -


is there plugin / possibility allow adding custom attributes html tags tinymce 4 wysiwyg?

for example, have added code via editor (not source code):

<div dir="ltr">     <a href="/uploads/myfile.pdf">my file<img src="/uploads/icons/pdf-icon.jpg" alt="my file" width="40" height="40" /></a> </div> 

all need add, example, class="mypdffile" or data-xxx="someval" attributes <div> tag viewed in above code.

how can without changing config object in tinymce.init?

through init can add styles menu editor in can create style applies div's , call class="mypdffile"

tinymce.init({     style_formats: [         {title: 'my pdf file', selector: 'div', classes: 'mypdffile'}     ] }); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -