ChatGPT via WYSIWYG

Date:


Artificial intelligence applications have hit like a massive wave over this past year, with ChatGPT being the most prominent. ChatGPT can take any written command and suggest content to match. What better than having the power of AI content creation than doing so within your own WYSIWYG editor! That’s what Froala can provide you — instant content creation with the power and intelligence of ChatGPT AI!

Quick Hits

  • The ChatGPT plugin can be installed in your WYSIWYG editor
  • Type a command, highlight that text, click the ChatGPT button, and wait for the response!
  • Help with content creation makes the written experience more enjoyable and the generated content more creative
  • Easy to implement from a technical perspective!

Implementing ChatGPT AI into Froala

Adding ChatGPT capability into your Froala WYSIWYG instance is really simple. Start by adding the button, registering the command, and adding it into the toolbar:

// Add the icon to the Chat GPT UI
FroalaEditor.DefineIcon('chatGPT', { NAME: 'help', SVG_KEY: 'help' });

// Register its functionality
FroalaEditor.RegisterCommand('chatGPT', {
  title: 'Ask ChatGPT',
  focus: false,
  undo: false,
  refreshAfterCallback: false,
  callback: async function callback() {
    const CHAT_GPT_KEY = 'YOUR API KEY HERE';
    const data = {
      model: 'text-davinci-003',
      prompt: this.selection.text(),
      max_tokens: 256,
      temperature: 0,
    };
    // Make the API call to ChatGPT
    const response = await fetch('https://api.openai.com/v1/completions', {
      method: 'post',
      headers: {
        'Content-Type': 'application/json',
        Authorization: `Bearer ${CHAT_GPT_KEY}`
      },
      body: JSON.stringify(data)
    });
    const { choices } = await response.json();
    // Insert the suggestion into selected text
    this.html.insert(choices[0].text);
  }
});

// Add ChatGPT to the toolbar during initialization
new FroalaEditor('#editor', {
  toolbarButtons: [['undo', 'redo', 'bold'], ['chatGPT']]
});

That’s all it takes to implement an incredible, powerful AI into your WYSIWYG editor!

ChatGPT and Froala in Tandem

Froala, the next generation WYSIWYG editor, is a perfect host for ChatGPT AI. Content creation is difficult, especially if you’ve run into writer’s block or simply want a better way to express your idea. Since ChatGPT is so smart, it can act as a thesaurus, dictionary, and writing partner all at once.

Use cases for ChatGPT in your WYSIWYG might include:

  • Rewording a sentence to improve creativity in the content
  • Asking a question to cut down on manual research
  • Getting a definition for a word you may not know
  • Getting translations for another language
  • Many more possibilities!

Building Smarter Interfaces

By incorporating ChatGPT AI into your WYSIWYG content editor, you’re able to build smarter content, applications, and interfaces. How? By asking ChatGPT to incorporate imagery, videos, and even embeddable HTML snippets. Take the following text example:

For example, this is what a healthy dog looks like:

Fetch a picture of a healthy dog <-- selected

After selecting “Fetch a picture of a healthy dog” and clicking the WYSIWYG’s ChatGPT button, the AI will respond by embedding a photo in your content. Likewise, if you ask ChatGPT to insert a video from YouTube, the amazing AI will do so.

Advanced Features

Froala is loaded with advanced features even before you add Chat GPT. Whether it’s image editing, PDF exporting, theming, or AJAX support, you’re really providing the best WYSIWYG available today. One of those crazy-awesome Froala abilities is realtime collaboration, which is even more powerful with ChatGPT — now every realtime collaborator has access to ChatGPT content generation!

Furthermore imagine this: Froala WYSIWYG users can ask ChatGPT to fetch images, videos, and other media to improve their content. The user doesn’t even need to know how to find or embed that media — Froala and ChatGPT do all of the work!

Making AI Accessible

“AI” and “ChatGPT” as keywords can feel intimidating to even the most tech-savvy users. By adding ChatGPT to your Froala WYSIWYG editor, you can make AI technology easy and accessible. Your user can then parlay that AI accessibility into much more rich, quality content to increase conversion and make more money.

Froala has always been an amazing WYSIWYG editor and seeing the addition of ChatGPT makes the WYSIWYG an incredible tool for content creation. Empowering users to create rich web content is all the better with the help of AI. Give Froala WYSIWYG a try and you’ll likely never look back — it keeps getting better!



Source link

Share post:

[tds_leads title_text="Subscribe" input_placeholder="Email address" btn_horiz_align="content-horiz-center" pp_checkbox="yes" pp_msg="SSd2ZSUyMHJlYWQlMjBhbmQlMjBhY2NlcHQlMjB0aGUlMjAlM0NhJTIwaHJlZiUzRCUyMiUyMyUyMiUzRVByaXZhY3klMjBQb2xpY3klM0MlMkZhJTNFLg==" f_title_font_family="653" f_title_font_size="eyJhbGwiOiIyNCIsInBvcnRyYWl0IjoiMjAiLCJsYW5kc2NhcGUiOiIyMiJ9" f_title_font_line_height="1" f_title_font_weight="700" f_title_font_spacing="-1" msg_composer="success" display="column" gap="10" input_padd="eyJhbGwiOiIxNXB4IDEwcHgiLCJsYW5kc2NhcGUiOiIxMnB4IDhweCIsInBvcnRyYWl0IjoiMTBweCA2cHgifQ==" input_border="1" btn_text="I want in" btn_tdicon="tdc-font-tdmp tdc-font-tdmp-arrow-right" btn_icon_size="eyJhbGwiOiIxOSIsImxhbmRzY2FwZSI6IjE3IiwicG9ydHJhaXQiOiIxNSJ9" btn_icon_space="eyJhbGwiOiI1IiwicG9ydHJhaXQiOiIzIn0=" btn_radius="3" input_radius="3" f_msg_font_family="653" f_msg_font_size="eyJhbGwiOiIxMyIsInBvcnRyYWl0IjoiMTIifQ==" f_msg_font_weight="600" f_msg_font_line_height="1.4" f_input_font_family="653" f_input_font_size="eyJhbGwiOiIxNCIsImxhbmRzY2FwZSI6IjEzIiwicG9ydHJhaXQiOiIxMiJ9" f_input_font_line_height="1.2" f_btn_font_family="653" f_input_font_weight="500" f_btn_font_size="eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSJ9" f_btn_font_line_height="1.2" f_btn_font_weight="700" f_pp_font_family="653" f_pp_font_size="eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSJ9" f_pp_font_line_height="1.2" pp_check_color="#000000" pp_check_color_a="#ec3535" pp_check_color_a_h="#c11f1f" f_btn_font_transform="uppercase" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjQwIiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGUiOnsibWFyZ2luLWJvdHRvbSI6IjM1IiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGVfbWF4X3dpZHRoIjoxMTQwLCJsYW5kc2NhcGVfbWluX3dpZHRoIjoxMDE5LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" msg_succ_radius="2" btn_bg="#ec3535" btn_bg_h="#c11f1f" title_space="eyJwb3J0cmFpdCI6IjEyIiwibGFuZHNjYXBlIjoiMTQiLCJhbGwiOiIxOCJ9" msg_space="eyJsYW5kc2NhcGUiOiIwIDAgMTJweCJ9" btn_padd="eyJsYW5kc2NhcGUiOiIxMiIsInBvcnRyYWl0IjoiMTBweCJ9" msg_padd="eyJwb3J0cmFpdCI6IjZweCAxMHB4In0="]
spot_imgspot_img

Popular

More like this
Related

Boursin Pasta Viral TikTok Recipe

This website may contain affiliate links and advertising...

3 Food Recalls You Need To Know About This Week

Within the last two weeks, three major...