Comcode

These FAQs briefly summarise key points regarding Composr's Comcode syntax.

For more information, check out these tutorials:
Question What is Comcode?
Answer Comcode is Composr's markup language, similar to BBCode used in forums. It allows you to create formatted text, embed dynamic content like blocks and attachments, and even mix in HTML for advanced styling. It's user-friendly and designed to work alongside standard web technologies.
Question What are the advantages of using Comcode?
Answer Comcode offers several advantages:

Intuitive content authoring: It's written like plain text, making it easy to learn and use.
Dynamic functionality: You can embed dynamic content like blocks, comments, and forms using Comcode.
Special effects: You can easily add prebuilt graphical features like tabs, carousels, and more.
Basic styling and layout: Comcode allows for basic website styling and page layout.
HTML integration: For advanced styling and layout, you can embed HTML code within Comcode with the semihtml tag.
Question How do I use Comcode tags?
Answer Comcode tags are similar to HTML tags, but use square brackets [] instead of angle brackets <>. Each tag has an opening and closing tag, with content in between.

Example: [b]This text would be bold.[/b]

Tags can also have parameters:
Example: [img src="image.jpg" alt="Image description"]

A shorthand exists for the param parameter (the primary parameter of Comcode tags):
Example: [page="_SEARCH:howdy_do"]Howdy do[/page]
Question How do I add attachments to my content?
Answer Composr has an integrated attachment system. You can upload files, like images or documents, via the attachments section (or the image button if using the WYSIWYG editor with simplified attachments UI), and they will be automatically added to your Comcode using the attachment tag. You can then move this tag within your content to position the attachment as needed.
Question What is oEmbed and how does it work with Comcode?
Answer oEmbed is a system that allows you to embed content from other websites simply by pasting its URL. When you paste a supported link in Comcode, oEmbed will automatically embed the content for you in a nicely-formatted box. For example, pasting a YouTube video link will embed the video directly into your content so it can be played on your website.
Question What are the security considerations when using Comcode?
Answer Composr has a multi-tiered security system for Comcode. HTML code is filtered based on user permissions to prevent XSS attacks. Content is parsed with different credentials depending on who is editing or adding it, ensuring users can't elevate their privileges by modifying existing content.
Question Can I create custom Comcode tags?
Answer Yes, you can create custom Comcode tags through the Admin Zone > Setup > Custom Comcode. This allows you to add unique functionality or wrap specific HTML code (especially if you use a certain block of HTML frequently on your site) for easier use. Custom Comcode tags can be tailored to your needs and even include your own parameters. You can also specify if the Comcode is dangerous so only those with elevated privileges can use it.