1. function generateTextBlockConfig() {
  2. const config = {
  3. // Block 1: Short paragraph
  4. block1: {
  5. type: "paragraph",
  6. maxLength: 150, // Max characters
  7. minLines: 1, // Minimum number of lines
  8. maxLines: 3, // Maximum number of lines
  9. // Add other properties as needed, e.g., font size, alignment
  10. },
  11. // Block 2: Medium paragraph
  12. block2: {
  13. type: "paragraph",
  14. maxLength: 300,
  15. minLines: 2,
  16. maxLines: 5,
  17. // Add other properties as needed
  18. },
  19. // Block 3: Bulleted list
  20. block3: {
  21. type: "list",
  22. maxLength: 200,
  23. minItems: 2,
  24. maxItems: 7,
  25. // Add other properties as needed
  26. },
  27. // Block 4: Quote
  28. block4: {
  29. type: "quote",
  30. maxLength: 250,
  31. minLines: 1,
  32. maxLines: 4,
  33. // Add other properties as needed
  34. }
  35. };
  36. return config;
  37. }
  38. // Example usage (for demonstration - you'd likely store/use this config)
  39. const config = generateTextBlockConfig();
  40. console.log(JSON.stringify(config, null, 2)); // Pretty print the config

Add your comment