Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Remove inline styles in Dreamweaver CC 2017

Community Beginner ,
Jan 30, 2017 Jan 30, 2017

!@Hi,

I'm trying to help make the process of moving content from word into the CMS as easy as possible for our content team.

Usually we will get a formatted word document. When we dump this into the CMS or DreamWeaver it adds garbage classes and inline styles - which we then need to remove.

Currently we need to use an online editor (https://html-online.com/editor/) to strip all of the inline styles out of the content

Is there any way that DreamWeaver can strip out both the inline styles and any classes?

It seems really silly that DreamWeaver can't do this easily.

Ideally I would like to be able to press or click a single command that will turn this:

<!Doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

<style type="text/css">

<!--

table.MsoTableGrid {border: solid windowtext 1.0pt;

  font-size: 12.0pt;

  font-family: "Cambria", serif;}

-->

</style>

</head>

<body>

<p style="line-height:115%;"><strong><span style="font-family:'Calibri',sans-serif; color:black; ">Lorem ipsum</span></strong></p>

<p style="text-align:justify;text-justify:inter-ideograph;line-height:115%;"><span style="line-height:115%; font-family:'Calibri',sans-serif; font-size:11.0pt; ">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc.<sup>2,3</sup> </p>

<p style="line-height:115%;"><strong><span style="font-family:'Calibri',sans-serif; color:black; ">Lorem ipsum 2</strong></p>

<p>Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>

</body>

</html>

Into a much prettier format:

<p><strong>Lorem ipsum</strong></p>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc.<sup>2,3</sup> </p>

<p><strong>Lorem ipsum 2</strong></p>

<p>Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>

2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 30, 2017 Jan 30, 2017

Yes it does. Please go to

Translate
Community Expert ,
Jan 30, 2017 Jan 30, 2017
It seems really silly that DreamWeaver can't do this easily.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 30, 2017 Jan 30, 2017

Thanks Ben.

I have tried this - it will not remove the inline styles in my version of DreamWeaver.

If you could try this with the example html snippet does this also leave the inline styles on the <p> tag?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2017 Jan 30, 2017

Yes it does. Please go to

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 31, 2017 Jan 31, 2017

Have you tried the various setting of Paste Special in DW?

1. Copy text from Word\

2. Right click in the Design View window and choose Paste Special...

3. Choose one of the 4 settings, probably "Text Only" or "Text with Structure"
4. Check Clean up Word paragraph spacing
5. Hit OK

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 31, 2017 Jan 31, 2017

I always use Paste Special (Ctrl+Shift+V) with Text Only as my default.  It's the best way to strip out formatted styles and other MS Word junk.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 31, 2017 Jan 31, 2017

I like the "Text with structure" setting myself (most times) then I at least have the <p> tags at the paragraph breaks from the original article, but yeah, I can't stand the style garbage that comes over from Word in a normal Paste.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 31, 2017 Jan 31, 2017
LATEST

Thanks Ben - I've submitted a it as a bug.

For those saying that I should use I should use one of the different Paste As options

I'm restricted to using the Paste As > Text with structure plus full formatting (bold, italic, styles) because most of the content contains sups tags. This is the only Paste As options that will export all of the content with Sups correctly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines