Umbraco TinyMCE editor - standard formatting for links

Is there a method within TinyMCE for Umbraco [Version 4.7] to preserve the inline style element of an anchor tag when modified in the editor?

In this case, we are unable to utilize CSS since the generated HTML is intended for email clients (inline styles are essential) and our clients use a template system to edit emails while maintaining layout consistency.

However, when modifying a link from the default template, the standard anchor tag is created without the inline styles specified in the template - is there a workaround for this issue?

Before editing:

<a target="_blank" href="http://#####.##.##/default.aspx" 
style="color: #0a72ca;    text-decoration: none;">Item</a>

After editing:

<a target="_blank" href="http://#####.##.##/default.aspx">Item</a>

Any assistance on this matter would be greatly appreciated!

Answer №1

To insert styles effectively into your revised content, consider the following approach:

<style>
  .CustomStyle {color: #0a72ca; text-decoration: none;}
</style>

<a target="_blank" href="http://#####.##.##/default.aspx" class="CustomStyle">Product</a>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Restricting the height of a column in Bootstrap 4 to create a more compact design

Currently, I have an element that contains a few columns. The issue is that all columns end up being the same height as the tallest one. What I want is to set a minimum height for one specific column, #colB, and have the other two columns scroll vertically ...

When conditions are met, all items are added to the array

In my Angular app, I have a user list that I am trying to filter based on the condition age > 45. However, all users are being pushed into the validForScheme array instead of just those meeting the condition. I am unable to figure out what is going wron ...

Page cannot be adjusted to fit the viewport

My goal is to have the page fit perfectly within the viewport, but despite using the body properties below, I am still seeing a vertical scrollbar. body { display: grid; grid-template: .8fr 4fr / 1fr 4fr; max-height: 100vh; margin: 0; } I'm w ...

Managing multiple carousels simultaneously using the middle mouse button in Swiper.js

I am currently utilizing 5 carousels on my screen, all of which are operated by the same navigation buttons. In addition to this, I require the ability to control them using the middle mouse scroll. However, when I activate the mouse wheel control, only ...

Copying to the clipboard now includes the parent of the targeted element

Edit - More Information: Here is a simplified version of the sandbox: https://codesandbox.io/s/stupefied-leftpad-k6eek Check out the demo here: https://i.sstatic.net/2XHu1.jpg The issue does not seem to occur in Firefox, but it does in Chrome and other ...

Create a grid or flex layout with Bootstrap 4 that features a sticky first row and column

Does anyone have any suggestions on how to make the attached grid/table layout responsive using Bootstrap 4's flex/grid system? The layout should include a sticky first row and column for navigation items. I attempted using w- & h- classes, but it do ...

Prevent a child DIV from adopting the style of its parent page

Imagine a scenario where you have a webpage with its own unique stylesheet. You decide to include a popup or modal at the end of the page using Javascript, but you want this popup to have its own distinct style. Since the content within the modal is dynami ...

Load a form using ajax and submit it using jQuery

For a while now, I have been facing challenges in figuring out what's going wrong with my code. The issue arises when I try to submit a form using jQuery that was loaded through ajax. The form loads perfectly fine within a div after invoking the ajax ...

Every click will nudge the square to the right

I have a square that should move 100px to the right when clicked, but on the next click it moves back to the left. How can I resolve this issue? On JSFiddle, the code works fine. However, when I try to run it in Chrome, I get an error message: Cannot re ...

Expanding borders occur when the element is repositioned using the translate property

I am trying to create a vertical line that remains in the center of a div container regardless of the screen size. I want this line to be 1px thick. However, when I use transform: translate(-50%, -50%);, the border seems to become thicker than expected. Be ...

Dragging and dropping elements onto the screen is causing them to overlap when trying

I am having trouble merging the drag and drop functionality from Angular Material with resizing in a table. Currently, both features are conflicting and overlapping each other. What I am hoping for is to automatically cancel resizing once drag and drop s ...

The navigation and title refuse to align in the center

Learning coding from scratch is a challenge, especially when tasked with creating a website for school. Right now, I'm gradually getting the hang of it, but I am struggling to center my navigation and title. Everything looks fine on my 13-inch laptop, ...

Update the display of the mouse pointer

I use CSS to set a custom cursor image: #scroll_up{ display: block; position: absolute; width: 960px; height: 300px; cursor: url(../imgs/cursor_up.png), auto; } The above style is assigned to a div element so that the cursor appea ...

I keep receiving an error in Angular JS but I'm unsure of the reason

I've been working on AngularJS and created a basic module and controller. I'm attempting to show the data of an element inside the controller on the HTML view page, but all I see is {{student.name}} and I'm receiving an error message that sa ...

Guide to Inserting an Image with AngularJS

Recently, I embarked on developing a web application with AngularJS. I encountered an issue while trying to incorporate an image into my page - unfortunately, the image failed to display properly. img src="src/assets/img/f1.png" alt="icon" I utilized the ...

Leveraging the power of HTML5 alongside Angularjs and Node/Express within the MEAN.js boilerplate framework

I've decided to kickstart my app using the mean.js () boilerplate because of its built-in authentication/authorization features. However, I've hit a roadblock when it comes to incorporating HTML5 into my project. In my Angular app, I've en ...

Adding attributes to parent DOM elements of a component in Angular2: A Step-by-Step Guide

I'm working with the following code: ... <div class="container"> <div class="fancy"> <fancybutton></fancybutton> </div> <button (click)="addAttribute()">Remove</button> <button (click)="remAttr ...

How can I locate and modify particular element attributes within PHP files in a WordPress template?

Hello everyone, I am relatively new to the world of Wordpress and have recently taken over a project from another developer. The previous developer left behind default placeholders and texts that need to be updated. One specific change I need to make is to ...

Preventing Page Refresh when Button is Clicked in Angular

How can I prevent page reload when a button is clicked in Angular? I'm developing a quiz application in Angular where I fetch random questions and options from an API. When users select an option, the next question should appear without reloading the ...

What could be the reason behind the repeated console messages when utilizing jquery to replace the src attribute of images?

Overview: An HTML page with two images, identified as #me1 and #me2 The images initially display 1.jpg and 2.jpg Clicking #me1 triggers a GET request to "randim.php" using jQuery to fetch a random filename, which is then set as the src= attribute ...