Help Center
In page editing, inserting, deleting, or modifying page contents is a common actions. By adjusting elements and and how they displayed, you can easily A/B test various page contents or designs to improve the user experience. Ptengine offers several editing features: Text Editing, Image Replacement, Link Editing, Style Editing & Rearrange contents, and HTML Editing. The first five options are ideal for users without coding expertise to make quick changes, while HTML Editing provides more advanced customization for users with technical knowledge.
This article provides a detailed guide on how to properly use Ptengine's HTML editing feature, ensuring stable and efficient page modifications without compromising website functionality or structure.
All examples in this article are from Ptengine. Click here to explore the detailed Ptengine Page Editing Demo.
To ensure your editing actions do not compromise the functionality or structure of the website, follow these key principles:
<h1>
<p>
<ul>
The HTML editing feature offers powerful customization options for users with technical expertise. Here are some common scenarios where it is recommended:
javascript
style
Suppose you want to adjust the layout of a product display section by adding an introduction area next to the product description to drive traffic to other product pages.
Original HTML code:
<div class="product"> <h2 class="product-title">Product Name</h2> <p class="product-description">Product Description</p> </div>
Modified:
<div class="product"> <h2 class="product-title">Product Name</h2> <section> <p class="product-description">Product Description</p> </section> <aside> <a href="#">Other Product Short Description</a> </aside> </div>
This modification adds two sub-modules to align with the new layout design.
Suppose you need to insert a custom HTML element, like an advertisement banner, onto your page.
<div class="content"> <h1>Welcome to Our Store</h1> <p>Offering the best products</p> </div>
<div class="content"> <h1>Welcome to Our Store</h1> <p>Offering the best products</p> <div class="ad-banner"> <img src="banner.jpg" alt="Ad Banner"> </div> </div>
Using the HTML editing feature, you can easily add new elements (like an ad banner) to enhance your page content.
Suppose you notice that some elements on the page have style issues and need to change the class name of a div element to restore proper display.
div
<div class="old-class">Content</div>
<div class="new-class">Content</div>
By modifying the HTML content, you can resolve style issues and ensure the page displays correctly.
Suppose you need to embed a third-party advertising plugin onto your page. Use the HTML editing feature to add the necessary container.
<div class="content"> <h1>Welcome to Our Store</h1> <p>Offering the best products</p> <div id="third-party-ad"></div> <!-- Insert ad plugin container --> </div>
This operation inserts the container for the third-party plugin using the HTML editing feature. The actual plugin code will be added and run using the CSS&JS modules in Code Mode.
Here are some common mistakes along with the correct alternatives to help you avoid potential issues, ensuring stability and performance during the editing process.
⚠️ Incorrect Action:
For example, if you want to modify the placeholder text of an input field, you might try this:
<input type="text" placeholder="Please enter your email address">
And change it to:
<input type="text" placeholder="Enter email to apply for product trial">
🔴 Impact:
The input element is interactive and often connected to JavaScript events (such as form validation, error messages, or submission actions). Directly editing the placeholder in HTML can inadvertently break the link between the input and JavaScript, causing related functions (like form validation or submission) to stop working properly.
input
placeholder
✅ Correct Action:
For modifying interactive elements, it's recommended to use Code Mode and modify them using JavaScript. For example, dynamically set the placeholder using JavaScript instead of directly editing it in HTML:
document.querySelector('input').setAttribute('placeholder', 'Enter email to apply for product trial');
This ensures the page's interactive functionality stays intact while allowing flexible dynamic content modifications.
You might want to change the page’s title content but mistakenly replace a p tag with a div, like this:
p
<p>The most Powerful</p>
Changed to:
<div>The most Intelligent</div>
Changing the tag type can cause the page’s styles to break, especially since tags like p are typically tied to specific style rules.
In Ptengine’s HTML editor, changing the tag type is not allowed. You can only edit the content inside the tags or add new child elements. Here's the proper way to do it:
<p>The most Intelligent</p>
If you only want to change the content of an element, use the Edit Text feature as follows:
By using the Edit text feature, you can safely modify content without affecting the overall layout or functionality of the page.
If you need to adjust the tag structure of the content, edit the parent container as follows:
By modifying the HTML of the parent container, you can safely adjust the tag structure without directly altering the target element.
You might want to add a product description module and directly insert a new element like this:
<div class="product-title">Product Name</div>
<div class="product-title">Product Name</div> <section class="product-description">Product description content.</section>
Adding sibling elements at the same level can cause layout issues or broken functionality.
In Ptengine’s HTML editor, adding sibling elements is not allowed. Instead, use the Insert feature to add new HTML elements. Here's how:
By using the Insert feature, you can effectively maintain the page's structure and prevent layout or functionality problems.
You might want to add two title contents at once and directly insert HTML like this:
<p>The most Powerful</p> <p>Website Growth Engine</p>
Ptengine’s HTML editor requires that new content be placed inside a single container element. Adding multiple sibling container elements directly can break the page's structure, leading to layout issues or style failures, such as misaligned modules or broken interactive features.
When adding new HTML content, make sure all elements are placed inside a single container element to maintain the page's structure. Here's the correct way:
html Copy code <div> <p>The most Powerful</p> <p>Website Growth Engine</p> </div>
By wrapping the new content inside a single container element (such as a <div>), you can ensure the page's layout and functionality stay intact while maintaining clean and readable code.
<div>
When using Ptengine's HTML editing features, keep these key points in mind:
By leveraging the tools and methods provided by Ptengine, you can safely and efficiently optimize web content, enhancing the overall user experience.
Was this article helpful?
Thanks for your feedback.
Sorry about that. Do you mind sharing how we can improve?
Write your feedback here...
We have received your feedback and will make sure to improve this article. We will get in touch with you once we do.