Updates 1 min

Effortless Integration: Harnessing TipTap Editor with Laravel Livewire

Tiptap is a headless editor framework with an open source core. Integrate over 100+ extensions like collaboration and AI agents and create the UX you want.Getting StartedInstalling @tiptap/core and @tiptap/starter-kit with NPM npm install -d @tiptap/core @tiptap/pm @tiptap/starter-kitTo set up the TipTap editor in your Laravel Livewire project, start by creating an editor.js file within the resources/js directory. This file serves as the configuration hub for integrating TipTap into your application. This JavaScript file initializes the TipTap editor instance and configures its extensions. Here’s a code given below:import { Editor } from '@tiptap/core' import StarterKit from '@tiptap/starter-kit' document.addEventListener('alpine:init', () => { window.setupEditor = function (content) { let editor return { content: content, init(element) { editor = new Editor({ element: element, extensions: [ StarterKit, ], content: this.content, onUpdate: ({ editor }) => { this.content = editor.getHTML() }, }) this.editor = editor; this.toggleBold = () => editor.chain().toggleBold().focus().run(); this.$watch('content', (content) => { // If the new content matches TipTap's then we just skip. if (content === editor.getHTML()) return /* Otherwise, it means that a force external to TipTap is modifying the data on this Alpine component, which could be Livewire itself. In this case, we just need to update TipTap's content and we're good to do. For more information on the `setContent()` method, see: https://www.tiptap.dev/api/commands/set-content */ editor.commands.setContent(content, false) }) } } } })Now import the editor.js file into app.jsimport './editor';remember that import path should direct to the editor.js file’s code. Now create an editor.blade.php file inside the components folder within resources/views. and write the code given below: whereDoesntStartWith('wire:model') }}> Bold Now, add the editor Blade component to any Livewire component of your choice.For further customization read tiptap documentation.

1 month ago
Updates 2 min

Empirical Discovery in Design: Understanding User Preferences and Needs for Optimal Software and UI Development

Empirical discovery is the most effective way to refine your design. While it may seem time-consuming initially, it will enable you to achieve a perfect design from the start. To achieve this, you need to categorize the users who will be using your design, taking into account softer factors such as gut reactions, preferences, social context, beliefs and values. These softer factors can significantly influence your design. Once you've categorized the users,go and meet them.Each user may be unique, and the software you are developing might target a specific audience. Keep these factors in mind. For instance, consider a scientific researcher who might use software with thousands of features, compromising on UI. However the same person may stop using a mobile phone app if its UI is not user-friendly or use it less.Each user is unique; what one finds difficult, another might not. Therefore, you need to generalize their thoughts. To do this, consider following questions.Their goals in using the software or site.The specific tasks they undertake to achieve those goals.The language and words they use to describe their actions.Their skill level in using software similar to what you're designing.Their attitudes towards the type of design you're creating and how different designs might affect  those attitudes.This process can be challenging, as you may receive distinct answers representing different user groups. You might be tempted to say, “I don't know who the users are” or “Everyone is a potential user.” However, this approach won't help you focus on your design. To address this, consider the following methods and topics:Direct Observation : Interviews and direct interactions with users immerse you in their world. You can inquire about their goals and typical tasks. These meetings can take place at their home or workspace, where they typically use the software. Interviews can be structured with a predefined set of questions or unstructured, offering flexibility. They can be formal or informal, conducted over the phone or in person.Surveys : Surveys can gather information from many users, providing numerous responses. However, since there is no human interaction, you may miss out on additional information. Careful survey design is essential. Analyze the responses accurately.Personas : Create fictional characters representing each major user group and imagine their extreme actions within the software. Personas can help you focus on specific user needs.You might notice that some of the methods mentioned, like interviews and surveys, resemble marketing activities. However, there is a difference. As a designer, you are trying to understand the people who use the software, whereas a marketing professional aims to understand those who buy it.While some of these techniques are formal, resembling science, if you don't have time for formal methods, meeting a few users informally is better than conducting no discovery at all. Engaging with people is good for the soul. Source: Desigining Interface by Jenifer Tidwell Published by O'Reilly

1 month ago
handshake

Tell me about your next project

© Copyright 2024
buymeacoffee