Jump to content

CKEditor Clipboard Pasting

Recommended Posts

Dear all,

I have a use case where there are big amounts of texts semi-manually imported from InDesign, the process is that .indd documents are converted to .html and then chunks of the text are copy & pasted into various fields in Processwire. I'm using a CKEditor field for this and I'm stuck as all classes are stripped from the pasted content.

<p class="Lauftext">
    Lorem ipsum dolor sit amet, <span class="Bold-Italic">consetetur sadipscing elitr,</span>
  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, 
  sed diam voluptua.<span class="Superscript">1</span>


as I have turned off ACF and HTML Purifier still all classes in the p and span tags are stripped. Any idea how to solve this? Tried in Chrome and Safari.

Share this post

Link to post
Share on other sites

You might want to look into that Extra Allowed Content setting in your textarea field.


You can change settings accordingly to the CKEditor docs.

So something like this could already do the trick:

// from the docs
// A rule accepting <p> and <h1> elements with all their attributes.
p h1[*]
// change it to
p h1 h2 h3 h4 h5 h6 ul ol li img[*]


  • Like 3

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...