Using anchors in CKEditor with Drupal across several text inputs - drupal-7

I'm currently working on a project in Drupal where the client has several content types containing multiple text inputs, each representing a paragraph in the final display. Each text input can be edited using CKEditor.
I've now run into the problem that if i enter an anchor in one of the text fields, that anchor is not known in any of the other text fields using the ckeditor link dialog. If i use the sharedspaces plugin for CKEditor to share the toolbar across instances, the problem persists.
So the question is: how can i add an anchor using CKEditor in one text input, and have it be recognised in another text input in the same form by CKEditor?

Related

Partially re-render PDF in React

I'm trying to achieve the following:
Overlay some text on top of a PDF
Edit that text using an input field (outside the PDF)
Update the PDF in real-time, without re-loading the entire PDF, i.e. a partial re-render
I've built a demo showing what I'm trying to achieve - this reloads the entire PDF when you type in the input.
https://react-pdf-demo.vercel.app
My question is: is this feasible? If so, how can I achieve it?

Displaying large text in Salesforce

I Have a requirement to show a user entered text/feedback on my Lightning component (UI) , initially i did a tool tip but it kind of truncates the text and I want to be able to show the whole text . what are my other options here in salesforce?
Tooltil is lightning help text and that should adjust item inside it automatically unless custom css is used
Did you look at the form element: https://www.lightningdesignsystem.com/components/form-element/
The question needs to have more details.

HighLight multiple words in the after rendering the html in the screen

Need to Highlight multiple words. It should not highlight any of HTML tags or HTML attributes in the HTML code based on the input received.
Simply put want to implement the CTRL+F function Within in my project
It will need application level filtering.
When you receive the document or comment or any kind of text, check if you have something in the search field.
If Yes, find and replace the contents of text with special HTML & Class to highlight specific part.
You can check the implementation of common React Autocomplete libraries. The highlight is in the list but you can use same approach in the Global manner.

How to edit EXIF populated content type fields in Drupal 7

I am using Drupal 7. I have created a content type IMAGE with keywords, caption, headline, category populated by EXIF and I also autogenerate the label. All I have to do is select a local image and hit save and everything I need is populated from the image metadata - all good so far.
The only problem is that I cannot edit the EXIF populated fields. If I want to move an image from one category (taxonomy) to another or notice a typo in the caption the only way I can make corrections is to delete the image, correct the text locally and reupload the image - when I select EDIT having found the content the default edit page does not show the field populated by EXIF. If I change them on the content type to a text or taxonomy field I can edit them, but I can't do that each time I want to edit a field.
I have searched but found nothing to help. Alternatively I have considered duplicating the EXIF populated fields on the IMAGE content type amd populating them using tokens from the EXIF populated fields and using those to drive my display views etc. I should then be able to edit them but it is not a very elegant solutions. I am not sure that will work after initially trying it.
I also have an issue that I need a multi-valued field other than keywords that I can use for the category/gallery (and there isn't one in the standard it seems). That will probably be a separate question when I have solved the editing problem.
I also tried using EditableViews modules which looked promising but it would still not let me edit the fields although it did display them.

Applying multiple CSS classes to same text in TinyMCE

I am having some issues getting TinyMCE to be as flexible as I need it to be. In my editor (used in a cakePHP-based app) I am not allowing users to edit the html, so we are relying entirely on the WYSIWYG. Unfortunately, TinyMCE is currently not allowing users to apply two CSS classes to the same text. Whichever style is applied last wipes out the original.
To give an example: If a user wants to designate a line of text to be both 'huge' and 'highlighted' (both CSS classes), they would highlight the text and choose 'huge' from the CSS style dropdown, then highlight the same text again and choose 'highlighted'. What results is text that only has the 'highlighted' class applied to it.
I can work around this problem currently by just adding an extra character to the text I am trying to style, apply the 'huge' class to that, apply the 'highlighted' class to the original text, and then delete the extra character. But, this really is far from an ideal solution.
Does anyone know of a way to resolve this issue?
You will have to write your own plugin looking similar to the style plugin.
When the user selects a class from the dropdown you just add it to the selected text instead of replacing it.

Resources