3

I'm building out an email editing area for my app so that I can move from the current file system version that I have to a database stored version to make it easier for admins to edit standard transactional emails and internal notifications.

Pretty straight forward code wise, using a wrapper template which will wrap all individual emails such as lost password, registration etc.

Using Summernote works well for the individual templates, but when using it with the wrapper template (which contains some standard CSS) the CSS in the editor overrides the CSS of the parent page the editor sits on.

Any ideas on how to isolate my template CSS so that my administrators don't get a crazy looking parent page when editing the wrapper?

secondman
  • 3,233
  • 6
  • 43
  • 66

1 Answers1

0

I think the best and most reliable way is to put all your content (including summernote) in an iframe.

In this topic, some guys discuss about this: Reset/remove CSS styles for element only

There is this workaround proposed by milche-patern and it's marked as the accepted answer, but I agree with JS_riddler.

I had the same issue in a project and with a little benchmarking, confirmed that a lot of websites with features like that, uses iframes.

Regards!

Community
  • 1
  • 1
gcstr
  • 1,466
  • 1
  • 21
  • 45