Paste from Word option to HTML Editor (tinyMCE)

ADAM Partner 4 years ago in ADAM Core updated by anonymous 4 years ago 0

Please add paste from word option to the HTML editor.


The nice thing about the "Paste from Word" plugin is that it strips out the Word formatting. The resulting content is a clean html.

meta-data fields

It all depends on what you consider "clean html". Some customers will want text color in Word to be pasted in HTML. You might not.

Independent of what you call "clean html", you should inherit Adam.Web.Extensions.UI.Controls.RichTextEditor. You should override the GetScriptDescriptors method. In that method you should write some Javascript that will initialize the tiny MCE editor. In that init code you can then put any config that is required to make sure only your version of "clean HTML" is allowed (or add some tiny MCE plugins).

Next to that you should override Adam.Web.Extensions.UI.Controls.ExtendedHtmlTextFieldControlBuilder and override the method CreateReadWriteControl. In that method you will create a instance of your rich text editor (as created in the previous paragraph).

Once that is done, you should now change the web.config of Assets studio. Find the section configuration/adam.web/fieldControls/builders and add a node like this:

<add type="My.Code.Adam.UI.Controls.MyRichTextEditorControlBuilder, My.Code.Adam" />