企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# raw 格式化编辑器文本(即将废弃) ## 格式化编辑器文本 该标签针对编辑器内容正常输出到网页。适用于任何以编辑器类型字段的内容,或者是带有HTML标签的内容。 > v2.2.1.20220603版本起,已取消限制,不再需要该标签转义,直接{$Info.content}即可 ## 格式示例 ``` <pre class="calibre16">``` <span class="token5">// 获取副表内容</span> <span class="token1">{</span>hkcms<span class="token1">:</span>raw name<span class="token">=</span><span class="token4">"$item.content"</span><span class="token1">}</span> <span class="token5">// 详情页</span> <span class="token1">{</span>hkcms<span class="token1">:</span>raw name<span class="token">=</span><span class="token4">"$Info.content"</span><span class="token1">}</span> ``` ``` ## 参数 参数名称可选值默认值是否必填说明name--是字段## 示例 - 列表页获取副表content字段,content字段是编辑器里面的内容。 ``` <pre class="calibre16">``` <span class="token1">{</span>hkcms<span class="token1">:</span>content catid<span class="token">=</span><span class="token4">"$Cate.id"</span> num<span class="token">=</span><span class="token4">"8"</span> page<span class="token">=</span><span class="token4">"1"</span> more<span class="token">=</span><span class="token4">"1"</span><span class="token1">}</span> <span class="token"><</span>div class<span class="token">=</span><span class="token4">"col-xl-3 p-2"</span><span class="token">></span> <span class="token"><</span>p class<span class="token">=</span><span class="token4">"card-text p-2"</span><span class="token">></span><span class="token"><</span>a href<span class="token">=</span><span class="token4">"{$item.url}"</span><span class="token">></span><span class="token1">{</span>$item<span class="token1">.</span>title<span class="token1">}</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span><span class="token"><</span><span class="token">/</span>p<span class="token">></span> <span class="token"><</span><span class="token">/</span>div<span class="token">></span> <span class="token5">// 对编辑器内容格式化,使能网页上正常显示编辑器内容</span> <span class="token1">{</span>hkcms<span class="token1">:</span>raw name<span class="token">=</span><span class="token4">"$item.content"</span><span class="token1">}</span> <span class="token1">{</span><span class="token">/</span>hkcms<span class="token1">:</span>content<span class="token1">}</span> ``` ``` - 内容页,对副表content字段处理 ``` <pre class="calibre16">``` <span class="token"><</span>div class<span class="token">=</span><span class="token4">"content"</span><span class="token">></span><span class="token1">{</span>hkcms<span class="token1">:</span>raw name<span class="token">=</span><span class="token4">"$Info.content"</span><span class="token1">}</span><span class="token"><</span><span class="token">/</span>div<span class="token">></span> ``` ``` 除了默认的content字段,您也可以对其他以编辑器编辑的文本或内容含有html,都可以使用该标签。