Expand my Community achievements bar.

SOLVED

Default paste mode for inline editing

Avatar

Adobe Champion

In a text component we've configured our rich text editor in the component dialog to have a default past mode of "plaintext" to ensure that it will use the select style, eg simple <p> tags, or headings, to ensure the CSS for the page will have full control of the styling.

The component is also enabled for inline edit.  This works great unless you past text from word or html as this mode will include the styling, meaning the text does not render using the CSS styles.

Is there any way to control the handling of pasted data in inline edit mode?  Ideally we just want plaintext in all editing modes.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Editing text in RTE has more functionality and it's where plug-ins take effect. In line editing is for fast editing and is not at the same level of functionality as the RTE. It's much better to use the RTE for text. Personally - i always use the RTE when authoring content in AEM.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Editing text in RTE has more functionality and it's where plug-ins take effect. In line editing is for fast editing and is not at the same level of functionality as the RTE. It's much better to use the RTE for text. Personally - i always use the RTE when authoring content in AEM.

Avatar

Level 10

In the docs at:

http://docs.adobe.com/docs/en/cq/5-6-1/administering/configuring_rich_text_editor.html

[img]paste.png[/img]

It states that you can select paste-plaintext. This should result in pasting only plain text. 

This is a RTE plugin and is applicable for the RTE and may not work for inline editing. 

Avatar

Adobe Champion

I would tend to agree, however we had a bug raised that text was rendering incorrectly and it turned out to be due to users doing a paste from word into the inline edit.

If there is no way to do it we may simply have to educate users to use the dialog when pasting potentially formatted text.

Perhaps this is something that could be added as a future update as it would seem to make sense to have the inline editor use the same paste mode as the RTE for consistency.

 

Alternatively, is there any way to hook into the inline editor system?, eg so we could add our own handler for the paste event which could strip html.