Share Your Work

joessss
メンバー

Can't figure out how to put a rich text field into my html hulb code

I want to be able to have a rich text module when I edit the page. however when I post the {% rich_text html="{{module.html}}" %} code within the module source code. a rich text field doesnt appear for me to type my text in. 

here is where i want to be able to adda rich text fieldhere is where i want to be able to adda rich text fieldthis is the HUBL code. i tried to insert a rich text code but it wont showthis is the HUBL code. i tried to insert a rich text code but it wont show

0 いいね!
3件の返信
AMichael1
参加者

Can't figure out how to put a rich text field into my html hulb code

To add a rich text field to your HTML code, you can use a variety of third-party libraries such as Quill.js, TinyMCE, or Froala Editor. These libraries allow you to easily create a rich text editor on your web page.

Here is an example of how to add the Quill.js library to your HTML code:

First, download the Quill.js library and add it to your project directory.
In the head section of your HTML file, include the Quill.js stylesheet and JavaScript file:
 

html

 

Copy code

<head>
<link href="path/to/quill.css" rel="stylesheet">
<script src="path/to/quill.js"></script>
</head>
Next, create a div element where you want to add the rich text field:
html
Copy code
<div id="editor"></div>
In a script tag, create a new Quill instance and pass in the ID of the div element:
html
Copy code
<script>
var quill = new Quill('#editor', {
theme: 'snow'
});
</script>
This will create a new Quill editor instance in the div element with ID "editor" and display it on your web page.

You can also customize the editor's appearance and functionality by passing in various options and modules to the Quill constructor. For more information, refer to the Quill.js documentation.

0 いいね!
prosa
トップ投稿者

Can't figure out how to put a rich text field into my html hulb code

 {% rich_text html="{{module.html}}" %}

remove the {{

 {% rich_text html="module.html" %}

 

since you are inside of a hb instruction already

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
0 いいね!
Stephanie-OG
キーアドバイザー

Can't figure out how to put a rich text field into my html hulb code

If this is within a custom module, then you can't add a module ( the {% rich_text html="{{module.html}}" %} ) to it, only fields. 

 

If you have a Rich Text field on the sidebar of your module with the internal name "html", then you can either add in the snippet for that module (Actions > Copy Snippet): 

 

<div class="elem-btn">{% inline_rich_text field="content" value="{{ module.html }}" %}</div>

or it's value (Actions > Copy value only):

 

<div class="elem-btn">{{ module.html }}</div>

Rich text field in custom module - copy snippet optionRich text field in custom module - copy snippet option


Stephanie O'Gay Garcia

HubSpot CMS Design & Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

0 いいね!