ACF field text have Blocks after the it is rendered - wordpress

I am having an issue while using the_field element from ACF. When the fields are echoed, there are squares added after the text on Windows 10 machines but the fun part is that I tried the site on a different computer with Windows 10 and Chrome and it rendered without any issues. All the fields are manually entered so encoding shouldn't have any effect on it.
<h1 class="bfold_h1"><?php the_field('home_above_title'); ?></h1>
This is how it's on the back end
https://www.dropbox.com/s/zja6tvxv9y8z3y9/Screenshot%202017-02-07%2012.39.57.png?dl=0
This is how it's rendered on Chrome in OS X
https://www.dropbox.com/s/gvfnuwvqb2uhm8t/Screenshot%202017-02-07%2012.40.48.png?dl=0
and this is how it's rendered on Windows Chrome
https://www.dropbox.com/s/bl4182ja339dyxc/Screenshot%202017-02-07%2012.43.18.png?dl=0
Any ideas appreciated, I checked phpmyadmin and the fields don't have any hidden characters. The field is simple text field.

I've been experiencing this same issue when copying text from Adobe Photoshop, and pasting it into custom fields. They only render in the Chrome browser. They appear to be some hidden characters signifying things like line breaks inside Photoshop.
In order to remove them, I've been selecting all the text in a field, pasting it into a text editor, then copying from the text editor and pasting back into the custom field.
There may be other ways to solve this, but this is what's been working for me.
These characters used to only appear in a beta version of Chrome, but in the last week or two, these changes made it into the Live version.

Related

Translate link destination with WPML for Elementor Text Editor links

After having been given the task of translating a whole "document" from german to english, I am really glad that WPML's Translation Editor makes it so easy to keep the structure intact and only change the actual text inside it.
That said, I've been running into an issue when the text comes from an Elementor Text Editor and contains links: WPML's Editor doesn't seem to offer a way to also translate a link's destination. It provides a way to mark where the text of a link is in the translation, but that's it.
And some links are language coded, like &lang=de, but since the Editor only translates the text of the link, the result then points at the wrong destination.
E.g. the english section of a text pointing to a source in german.
This is something I keep having to fix manually afterwards, because the Editor only offers translating destinations for Elementor widgets that declare the fields translateable, and even there it can be spotty, as I've found out.
Now I am wondering if there's something I could do to configure WPML to take those links inside the Text Editor element like it does with actual link elements, or if that's out of the question.
I'd really prefer to not have to routinely check the translation destinations, because as it stands do I not even know when WPML triggered an automatic translation because something about the layout changed, but no text changes happened.
So the changes to the link destinations could be just undone silently, which has happened before for a different part of the site.

Keep text format when copy/paste from Angular Application

I've realized that when I try to copy/paste a text from an Angular Application to any text editor software (ie Microsoft Word), all the text loses the original format.
I'm using as example the angular material website: https://material.angular.io/
When I copy the text and past in Microsoft Word:
Thats means, the pasted text lost the center alignment, the color and de font type.
Is there a way to keep the website format? I know that the font used by Angular Material is different from text editor, but there are another things that could be mantained (i.e. alignment, color, etc).
I've started a project using Angular 8 + Angular Material and I'm facing the same problem.
Well, you're not likely to get a straight copy/paste action to do what you're requesting.
Why it doesn't work as you expect:
Copy & Paste out of MS Word for example and you'll get Rich Text where all the formatting is part of the data payload. When you copy this to the clipboard all that extra styling metadata goes along with the text. If you paste that data INTO a rich text editor (not a straight text input) like Wordpress's Admin that editor package translates the text metadata that you can't see into equivalent HTML styling.
However, When you copy from HTML (in your browsers) all you're getting is the text without all the "rich" formatting. This happens because a browser uses outside context like DOM position, tag type, and CSS to style the HTML content into what is presented for you to see.
Rich text copy for just YOU
There are multiple browser plug-ins for Chrome and Firefox that will intercept your copy request, create formatting and then paste that to the clipboard. Just ask Google for recommendations.
Rich text copy for all users of a project
This, unfortunately, is more complicated. You will need to write code to do the following (this answer has a good example):
Figure out what the user is trying to copy (usually mapped to selected text).
Convert that content into rich text format. The example above simply copies the HTML but that won't get styling applied by external CSS. Packages like Quill MIGHT give you the option to get rich text back out.
Copy your converted text to the user's local clipboard. You shouldn't hijack browser commands to do this which is why you frequently see a "copy to clipboard" button to do this action. You can move content to the user's clipboard using the Clipboard API in most modern browsers.
Oh and you'll need the user's permission to do all this since proactively interacting with the user's clipboard presents a pretty massive security issue.

HtmlEditor causes unwanted breaklines

I am not using the AjaxControlToolkit's HtmlEditor because it do not have a direct button to insert images, that is why I searched for another editor and I finally found the Winthusiasm editor.
Everything seems to work fine, but it really doesn't. Let's see that step by step. In the example I am demonstrating the use of a subscript, but the behavior is the same for any improvement of the text (bold, italic, ...):
1 - I use the HtmlEditor to insert enhanced text into the database. I have developed a page that works as ControlPanel and this page shows the existing items stored in the database as a ListView:
2 - If I click on "edit" button I can edit the content by the HtmlEditor:
3 - So far so good. The issue occurs on the end-user page, the page in which the content is going to be showed for all the regular users of the page:
I researched on the generated source code in this last page but I can not find any br declared. Everything seems ok in the code, so I am completely lost. I tried to enter the text in an ASP:Literal and an ASP:Label, but the result is the same.
Any ideas? Thanks a lot.
Solved. I figured out it was just a CSS issue because although Chrome shows the text in a wrong way, Internet Explorer was rendering it fine, so it could not be a code issue.

TinyMCE adds <pre> tag when inserting from Word

I have several Drupal 6 sites which use the WYSIWYG module along with TinyMCE. For one of my sites, whenever I use the Paste From Word icon, it adds a < pre > tag with the class "mceItemHidden".
In addition, if the text is long enough, it does this strange thing where I click the "Insert" button in the Paste from Word window, the text appears in the main TinyMCE box, there is a brief pause, and then each paragraph is on a single line, which creates the horizontal scrollbar that is as long as the paragraph.
Has anyone experienced this, and do you have any idea why this is happening? I've tried changing my theme and various WYSIWIG settings and this is still happening.
Pasting from word is an odd thing. I couldn't say for sure but MS seems to tweak it now and then to make it especially difficult to translate (while making sure that it still renders well in IE)
Do you get the same issue in the tinyMCE offical demo, if not you could try upgrading your FCK editor.
Pasting from word to begin with is a pain in the.... It's still a fight for us even with FCKeditor. It was a fight when we used Tiny as well. All that nasty xml and tags were brutal on our CSS.
You might check your drupal filters and the way that tiny sanitizes stuff. I forget where all that is. We used tiny for a while, then switched to FCKeditor. We switched for the image upload support. Much better than tiny. Anywho...
Something must have been corrupt. I just completely removed TinyMCE from the libraries directory, and uninstalled the WYSIWYG module. I reinstalled everything, and things seem to be working (for now).

Flex text field do not work under MacOS X

Strange problem. Text fields in my flex simply do not work under Mac. Inputted characters do not appear within it. I do not have any specific font set (just _serif), so I don't thing it's font issue.
In what direction should I dig? Have anyone similar experience?
Try creating a completely new project with no formatting of any kind. Create a single text field and see if that shows up.
You may want to consider removing the _serif css to see if that has any effect.
See Soliant's blog for other helpful flex examples

Resources