Implement professional smart formatting with toggle logic and whitespace preservation
This commit is contained in:
@@ -29,12 +29,11 @@ export class ApiClient {
|
||||
}
|
||||
|
||||
|
||||
async createContent(content, type, htmlMarkup) {
|
||||
async createContent(content, htmlMarkup) {
|
||||
try {
|
||||
const payload = {
|
||||
html_markup: htmlMarkup, // Always send HTML markup - server extracts ID or generates new one
|
||||
html_content: content,
|
||||
type: type,
|
||||
file_path: this.getCurrentFilePath() // Always include file path for consistent ID generation
|
||||
};
|
||||
|
||||
@@ -49,7 +48,7 @@ export class ApiClient {
|
||||
|
||||
if (response.ok) {
|
||||
const result = await response.json();
|
||||
console.log(`✅ Content created: ${result.id} (${result.type})`);
|
||||
console.log(`✅ Content created: ${result.id}`);
|
||||
return result;
|
||||
} else {
|
||||
console.warn(`⚠️ Create failed (${response.status}): server will generate ID`);
|
||||
|
||||
Reference in New Issue
Block a user