Open-source News

Handle any type of document with this open source tool

opensource.com - Mon, 04/03/2023 - 15:00
Handle any type of document with this open source tool hej Mon, 04/03/2023 - 03:00

Collabora Online supports all sorts of files and formats. How does this open source office suite do in terms of interoperability, though? This article takes a closer look at Collabora Online's ability to exchange complex text documents and spreadsheets with different office suites such as Microsoft 365 and Google Workspace.

Collabora Online is an open source office suite for the cloud or on-premises that protects your privacy and allows you to keep full control of your data. The software is developed by Collabora Productivity Ltd, in Cambridge, with its team working in locations worldwide. Collabora Online is based on LibreOffice Technology and is primarily licensed under the Mozilla Public License 2.0.

Collabora Online works in any modern web browser, requiring no additional plug-ins or add-ons. It features a complete cloud-based office suite, including a word processor (Writer), spreadsheet program (Calc), presentation software (Impress), and an application for designing vector graphics (Draw).

This article looks at some of the new Collabora Online's interoperability features, including macros, dynamic font loading, and Sparklines support for the spreadsheet application. These features extend the existing great handling of Microsoft file formats.

What is interoperability, and why does it matter?

In general, interoperability refers to the ability of different devices or applications to work together and exchange data seamlessly. In the context of office suites, interoperability is mostly about file formats. Users should be able to open, edit, and save .doc and .docx, .xls and .xlsx, .odt, and .ods documents, regardless of whether they were created with Microsoft Word, Apple iWork, or LibreOffice.

The same is true for online office suites. By ensuring that files can be exchanged between Microsoft 365, Google Workspace, and Collabora Online, interoperability helps to increase productivity and facilitate collaboration. All online office suites can save files in various formats. They can also import and export documents, spreadsheets, and presentations originally created in other office suites.

Managing macros and ensuring smooth document handling

Something that often causes problems are documents with macros. They're usually developed in a programming language specific to a particular application. While recording and editing macros in Google Sheets is possible, macros implemented in Visual Basic for Applications (VBA) in Microsoft Office cannot be converted and must be re-created with Google Apps Script. Opening a Word document with VBA macros produces errors and informs users that the macros will be ignored or disabled.

Collabora Online supports macros and runs them on the server side inside a container. The feature is disabled by default, and admins must explicitly activate it in the coolwsd.xml configuration file. After that, users can choose to allow macros when loading a document. There are several limitations, though. For example, it's not possible to access database sources, access other (external) documents, call external programs, use control shapes, and so on. Over the years, the amount of code and objects supported by Collabora Online has increased significantly, thanks to an active community and contributions from customers and partners.

Collabora Online: dynamic font loading

Another critical aspect of interoperability in office suites is fonts. Working with documents containing fonts that aren't available on a particular platform can result in errors, unexpected formatting changes, and even the complete loss of content.

Microsoft Office documents often use default fonts that aren't available in Google Workspace or Collabora Online. To address this issue, the office suites often suggest substituting missing fonts. That's often useful, but it sometimes leads to a bad result.

As of version 22.05.7 (released in November 2022), Collabora Online can list missing fonts and suggest substitutions. It can also download the necessary fonts and add them to the server. Everything happens dynamically, without downtime. New fonts become available in editing sessions within minutes for optimal interoperability.

Image by:

(Heike Jurzik, CC BY-SA 4.0)

To achieve that, information about missing fonts is tracked down by an API while the document is being rendered. A JSON file stores the list of fonts that need to be added. The coolwsd.xml file (the server-side settings) points to that JSON file. It checks for modifications once every minute and downloads the missing fonts.

Exploring Sparklines: displaying data trends in spreadsheets

Sparklines are tiny charts that fit inside a single cell of your worksheet, visualizing trends in data. Those miniature charts come in different styles, including lines, bars, and columns. Sparklines also support different colors and horizontal/vertical axis. Unlike larger charts that show as much data as possible and are separated from the text flow, Sparklines are reduced to the core values and typically placed next to or behind the data itself in the same cell. Sparklines are usually defined for one cell, but it's possible to group multiple Sparklines that share the same data range and properties for rendering.

Image by:

(Heike Jurzik, CC BY-SA 4.0)

Our favorite resources about open source Git cheat sheet Advanced Linux commands cheat sheet Open source alternatives Free online course: RHEL technical overview Check out more cheat sheets

Sparklines are a compact reference and offer a quick way to illustrate trends, patterns, statistical anomalies, increases, and decreases, all while avoiding the complexity of a full chart. Here are some different Sparkline types:

  • Line Chart: Connects points by line segments from left to right and is particularly useful for displaying data that changes over a certain time.
  • Bar Chart: A graphical representation of data using horizontally aligned bars, often used to compare numerical data.
  • Column Chart: Ideal for comparing a series of values against each other; the columns are vertical, and their lengths indicate the relative size/value of the data. Column charts are often used to represent data of distinct categories or groups.

To create a Sparkline, you first define an input data range for the function (two or more cells in a column or a row). You also decide on the cell where you want the Sparkline to appear. In most spreadsheet applications, you right-click the mini chart to adjust its properties, select the chart type, and choose the colors. Collabora Online offers a separate dialog box for this, making it easy and convenient to change the style of the miniature charts.

Exchanging documents with Sparklines between the three online offices is possible without losing the graphs and their formatting. If you want to share spreadsheets between Microsoft 365, Google Workspace and Collabora Online, make sure to use the Microsoft format .xlsx for import and export, since Google Sheets doesn't handle .ods files very well.

Document exchange is easy

Collabora Online provides several new interoperability features, making exchanging documents with other office suites easy. Macro support, dynamic font loading, and Sparklines ensure seamless document handling, avoiding unexpected formatting changes. Use Collabora Online to unify and simplify your office work.

Explore Collabora Online's interoperability and make documents and spreadsheets compatible across all office suites.

Business Alternatives Tools LibreOffice What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Open source text editing for your website with CKEditor

opensource.com - Mon, 04/03/2023 - 15:00
Open source text editing for your website with CKEditor AnnaTomanek Mon, 04/03/2023 - 03:00

Most applications allow users to create and add some textual content, such as a comment, a chat message, an article, a product description, or a legal document. Today, plain text isn't enough. Users format text, insert images and memes, videos, tables, and create lists and links. A developer can probably craft this rich content in HTML by hand, but there's a high chance that your users would appreciate some help.

WYSIWYG ("What You See Is What You Get") editing allows you to see and edit rich text content in a form that resembles how it's displayed to end users. A WYSIWYG editor provides a UI that makes it easy to format the text and incorporate various elements such as images, links, or tables into your digital content.

If you want to supply this sort of functionality in your app, you can choose to:

  1. Build it yourself
  2. Find a WYSIWYG editor component you can reuse

Each option has advantages and disadvantages.

Build it yourself...

If your use case is simple and you don't need many features, building your own component may feel like a way to go. WYSIWYG editing sounds easy.

It's not.

Even when you're starting simple, requirements tend to grow over time. Content creation is such a widely accepted paradigm that users now expect it to work in your application similarly to anywhere else. They want to see a familiar feature set and UX patterns. Creating and maintaining this takes time and effort that could otherwise be spent on developing your app.

There's a valid reason why content editing functionality is often outsourced to an external library, even in big projects with considerable engineering teams. It requires deep domain knowledge to do it well.

Assume you decide to integrate a ready-to-use editing component or framework. There are plenty of rich text editing solutions on the market. The differences between them usually revolve around the feature set, UX, integrations with various technologies, extensibility, licensing, popularity, project health, and support options. So, similar to any external library, when you're choosing an editor, it's best to consider your use case so you can avoid a costly mistake and further migration in the future.

Sure, there are some challenges you face when integrating a WYSIWYG editing component, but they're easy to resolve when you're using the popular open source CKEditor 5.

Or choose CKEditor

CKEditor has been around for 20 years(!) as an open source project. It's backed by CKSource, a company of about 100 people who work, day in and day out, on improving the editor. The latest version, CKEditor 5, is a modern, flexible, extensible, and customizable component written in pure TypeScript and JavaScript. It's built on top of a robust collaboration-ready editing framework with model-view-controller (MVC) architecture, a custom data model, and virtual DOM.

Running a simple editor in 3 steps with CKEditor 5

Here are the basics of integrating CKEditor with a simple website.

To get up and running, load the editor script from the CDN, and call its create() method to create the editor:

  1. In an HTML page, add an element to serve as a placeholder for a CKEditor 5 instance:

  2. Load the editor build script (here, a so-called classic editor build is loaded from the CDN):

  3. Call the ClassicEditor.create() method to display the editor.

    ClassicEditor .create( document.querySelector( '#editor' ) ) .catch( error => { console.error( error ); } );

And that's it. A full web page with an embedded CKEditor 5:

CKEditor 5 – Classic editor CKEditor 5 - cool, eh?

This is some sample content for my new WYSIWYG editor.

ClassicEditor .create( document.querySelector( '#editor' ) ) .catch( error => { console.error( error ); } );

Open it in your browser to test the WYSIWYG editor:

Image by:

(Anna Tomanek, CC BY-SA 4.0)

Advanced WYSIWYG editing

Yes, there are only three steps, and it's running. But this simple example also uncovers some typical challenges faced by an integrator of an external framework.

  • It's just a simple HTML website that misses the entire context of your app.
  • The UI doesn't match your design system.
  • Your app is written in React/Angular/Vue, or something else.
  • You don't want to serve CDN scripts, and prefer to self-host.
  • The feature set of the editor isn't what you need.
  • Also, some of your users prefer Markdown to HTML or WYSIWYG "magic".

So how do you resolve some of these issues? Most editor components allow for some degree of customization that's still cheaper than writing a custom script to properly handle user content creation.

CKEditor 5 uses a plugin-based architecture, which provides excellent customizability and extensibility. By putting in some effort, you can benefit from a stable, popular, and reliable solution set up to look and work exactly as you want. Drupal 10, for example, built CKEditor 5 into its core and enriched it with some typical CMS functionality like a media library through custom plugins.

What are some ways you can take advantage of all these customization options? Here are five that showcase its versatility:

1. Flexible UI options

The first thing to notice when looking at a component to integrate with your application is its user interface. The CKEditor 5 framework delivers a few different UI types. For example:

  • Classic Editor, used in the first example, offers a toolbar with an editing area placed in a specific position on the page. The toolbar stays visible when you scroll down the page, and the editor automatically grows with the content.
  • The Document editor provides a similar editing experience to applications such as Microsoft Word or Google Docs, with a UI that resembles a paper document.
  • If you're looking for distraction-free editing, where the content is placed in its target location on the web page without the editor UI getting in your way, you have a few options. The Inline Editor, Balloon Editor, and Balloon Block Editor all come with different types of floating toolbars that appear as needed.

Besides that, you can play with the toolbar to move the buttons around, group them into drop-downs, use a multi-line toolbar, or hide some less-frequently needed buttons in the "three dots" or "more options" menu. Or, if you wish, move the entire toolbar to the bottom.

It may also happen that you prefer to go the headless route. Plenty of projects use the powerful editing engine of CKEditor 5 but coupled with their own UI created in, for example, React. The most notable example is Microsoft Teams, believe it or not. Yes, it's using CKEditor 5.

Image by:

(Anna Tomanek, CC BY-SA 4.0)

2. Choose a full-featured editor or a lightweight one

In digital content editing, there's no "one size fits all" solution. Depending on the type of content you need, the feature set differs. CKEditor 5 has a plugin-based architecture and features are implemented in a highly decoupled and granular way.

It's easy to get lost in all the possible features, sub-features, and configuration options without some guidance. Here are some useful resources to help you build the editor that's a perfect match for your use case:

  • Try the feature-rich editor demo to test some of the most popular features.
  • Look at some other editor setups on the demo page. You can find the complete source code of each demo in the ckeditor5-demos repository.
  • The entire Features section of the documentation explains all CKEditor 5 features, possible configuration options, toolbar buttons, and API.
  • CKEditor 5 online builder is a quick and easy solution to build your custom editor in 5 steps. It allows you to choose the UI type, plugins, toolbar setup, and UI language and then download a ready-to-use editor bundle.
Image by:

(Anna Tomanek, CC BY-SA 4.0)

3. Integrations with JavaScript frameworks

The online builder and demos are a fun playground if you want to test a few solutions in a no-code fashion, but you may need tighter integration. You can also install CKEditor 5 with npm, or bundle it with your app using webpack or Vite. CKEditor 5 is written in pure TypeScript and JavaScript, so it's compatible with every JavaScript framework available.

Four official integrations are available for the most popular frameworks:

  • Angular
  • React
  • Vue.js v2
  • Vue.js v3

For example, to set up the Classic Editor (used in my first example) in React, you can use this one-liner:

npx create-react-app ckeditor5-classic-demo \ --template @ckeditor/ckeditor5-classic4. Markdown and HTML

For some developers, Markdown might feel like second nature. It has its limitations, though. For example, support for tables is quite basic. Still, for many users, crafting content in Markdown is much more efficient than using the editor UI to format it.

And here's the fun part. Thanks to CKEditor's autoformatting, you can use Markdown syntax when writing, and the editor formats the content as you type. This is a nice compromise for covering the needs of both power users and users unfamiliar with Markdown and preferring to create rich text using the WYSIWYG UI.

5. Different input and output

Autoformatting is just one aspect of Markdown support in CKEditor 5. Another is that you can configure the editor to treat Markdown as its input and output format instead of HTML.

Image by:

(Anna Tomanek, CC BY-SA 4.0)

Here's another challenge. If you allow the users to input content in your app, they can create it there but also paste it from different sources (other websites, Microsoft Word, Google Docs). They naturally expect the structure and formatting of pasted text to be preserved. This may result in some nasty styles and unwanted elements making their way to your content, and you have to clean up. Instead of trying to reconcile these two potential clashes of interest by yourself, it's better to rely on a good editor that solves this problem for you.

In the case of CKEditor 5, the Paste from Office feature provides great support for pasting content from Word or Google Docs, preserving the structure, and translating the formatting into semantic content.

The default CKEditor 5 settings also prevent users from adding or pasting elements and styles unsupported by the feature set chosen for your editor. If you, as an integrator, configure the editor to support just links, lists, and basic styles such as bold or italic, then the user can't add tables, images, or YouTube videos.

Then again, if you would like your editor to accept content that's not covered by your feature set or even not supported by any existing CKEditor 5 features, you can achieve that thanks to the so-called General HTML support functionality. This is useful for loading pre-existing content created in other tools, and can make your migration to CKEditor 5 easier.

Building custom plugins

No matter how great a ready-made solution is, you may still need to customize it even more. After all, thanks to reusing an advanced WYSIWYG editing component, you've saved yourself plenty of time and coding effort. You may want to get your hands dirty and polish your solution a bit, for example, by creating custom plugins.

Here are some useful resources to get you started:

Image by:

(Anna Tomanek, CC BY-SA 4.0)

How to get CKEditor

CKEditor 5 is licensed under the terms of GPL 2 or later, but if you are running an open source project under an OSI-approved license incompatible with GPL, the CKEditor team is happy to support you with a no-cost license.

CKEditor 5 is a powerful modern rich text editor framework that allows developers to build upon an open source, tested, and reliable editor. Start-ups, leading brands, and software providers use it to improve both their content creation and content production workflows. If your users value those benefits, check it out!

Use the power of JavaScript and CKEditor to bring rich text editing to your website.

Text editors Web development Drupal JavaScript What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. 1 Comment Register or Login to post a comment. madtom1999 | April 3, 2023 Register or Login to like

I did write a PHP web backend for (F)CK editor as it was which stored the files in a DB along with security functions to allow who could read/edit etc and allowed you (with the right editor) to modify code etc only to dig it out recently to find PHP has moved on and I've not got the code working again yet. But with something like that you never need touch a desktop again.

Linux_Logo – Print ASCII Logo Of Linux with System Information

Tecmint - Mon, 04/03/2023 - 14:35
The post Linux_Logo – Print ASCII Logo Of Linux with System Information first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

linuxlogo or linux_logo is a tiny command line utility that generates a color ANSI picture of the Linux distribution logo with an uptime (shows system uptime) along with the other system information. The linux_logo

The post Linux_Logo – Print ASCII Logo Of Linux with System Information first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

19 Best Open Source WYSIWYG HTML Editors in 2023

Tecmint - Mon, 04/03/2023 - 14:26
The post 19 Best Open Source WYSIWYG HTML Editors in 2023 first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Every website on the internet uses HTML language and relies on using an editor to build the website. The HTML editor is a platform to edit and create the website’s content. A great way

The post 19 Best Open Source WYSIWYG HTML Editors in 2023 first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Linux 6.3-rc5 Released - Looking To Be In Good Shape

Phoronix - Mon, 04/03/2023 - 05:55
Linus Torvalds just released Linux 6.3-rc5 and it's looking to be in good shape for this stage of development...

Intel Linux Improvements, AMD openSIL, Zen 4 3D V-Cache & Other March Highlights

Phoronix - Mon, 04/03/2023 - 00:22
Along with the Phoronix Q1'2023 recap, here is a look back at what excited Phoronix readers the most in March when it came to all of the original open-source and Linux focused content. During March on Phoronix were 240 original news articles and 15 featured Linux hardware reviews / multi-page benchmark articles written by your's truly...

Intel Alder Lake Motherboard With Coreboot/Dasharo Support On Sale For $153 USD

Phoronix - Sun, 04/02/2023 - 20:48
If you have been wanting to experiment with running the open-source Coreboot on a modern Intel Alder Lake (Z690) motherboard, the MSI PRO Z690-A WiFi DDR4 that works thanks to 3mdeb's Dasharo is now for sale at its lowest price ever at just over $150...

Pages