Code switch from p to div, why?
Hello,
When I go and add in custom code into the HTML area of a Text content type, it always changes the <p> to <div> (I'm using javascript to grab all the <p> and so when the system switches them over to <div>, it does not work). Then I have to use an embedded widget, which works, but creates some other coding spacing problems in the page footer.
Oh, and my code works in Sublime.
Why does the system switch it?
Thanks,
Tyler
Comments
-
@Tyler Johnson
Many CMS/WYSIWYG editors have automatic HTML sanitization or reformatting that will rewrite your markup behind the scenes when you save or switch between views, converting to <div> tags. It is hard to say with out being given specifics but you can try instead of the one tag, select both <p> and <div> tags: `document.querySelectorAll('p, div')`
Maybe a class or attribute to the element with get pass the editor or lean on CSS targeting the widget to fix the spacing issues.1 -
@Bryce Howard
interesting….thanks for responding and I will try that out!Cheers.
0
Categories
- All Categories
- New YourCause Community TEST
- New SKY Community TEST
- New Grantmaking TEST Community
- New Altru Test Community
- New bbcon Community - TEST
- 12 Blackbaud Agents for Good™
- New Raiser's Edge NXT Community
- 7 Blackbaud Community Help
- 218 bbcon®
- 1.4K Blackbaud Altru®
- 409 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 16 donorCentrics®
- 361 Blackbaud eTapestry®
- 2.7K Blackbaud Financial Edge NXT®
- 680 Blackbaud Grantmaking™
- 598 Blackbaud Education Management Solutions for Higher Education
- 3.3K Blackbaud Education Management Solutions for K-12 Schools
- 952 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 85 JustGiving® from Blackbaud®
- 7K Blackbaud Raiser's Edge NXT®
- 3.9K SKY Developer
- 255 ResearchPoint™
- 122 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 246 Member Lounge (Just for Fun)
- 40 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Closed) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 822 Community News
- 3.1K Jobs Board
- 57 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

