TinyMCE / Prestashop - get HTML content - tinymce

I'm currently working on a website and I have to use Prestashop.
I created a back office interface that allows the user to write, edit and delete articles. So I put a tinyMCE editor in it.
The problem is that when I click on 'save' to store the article in the database, it only stores raw text, without the styling content (html tags, bold text etc)
I would like to know how to get the whole content, including html tags, styling etc.
Thank you.

Ok so all I had to do was to change self::TYPE_STRING to self::TYPE_HTML in my Article.php file.

Related

How to enable hyperlinks in grid

I have a document that contains a grid (Among others).
One column in the grid has full hyperlinks leading to a ticketing system, i.e.
https://ticketsystem.internal.company.com/tickets/ticket1337
I want to enable users to click on the URL and open the ticket in a new browserwindow.
How do I do that?
I assume the url is an attribute form, if you right click on the column header you should be able to create the link (below the example in web, but it works similarly also in Developer).
The attribut needs to be formatted with HTML tags to be a clickable link, using to encapsule the URL-string.
This is done in the data model.

How to link to the attachments added from the description of a workitem?

In VSTS attachment can be uploaded for workitems. Those attachments are displayed in a seperate tab.
I found no way to reference those attachments from within the description of the workitems.
So how to do it?
drag and drop the attachment to your browsers URL text field
(optional:) remove the &download=true&api-version=5.0-preview.2 part at the end
use this URL to create a link in your comment
I did not find another way yet and maybe it is not so logical :). But as workaround you may download an attachment from work item. Then you may copy a download link from your browser download page and use it on description field.
A workaround that I found to this which shows a selected text within the comment as clickable and opens the attachment if you click on it is:
find and copy the attachment url from browser Developer Tools,
select the part of the text in Discussion box that you like to link to the attachment to,
paste the attachment url to Address box in Create Link popup. You can get to this by using three dots (...) in Discussion section toolbox (More Tools) and select Create Link which allows you to paste the address.
This is amazing that AzureDevops does not have this ability. It's disappointing and makes working with the product so much more difficult. I really cannot imagine how they use this product internally.
You could inspect the attachment url in chromedev tools, then copy the url, the element will look like
<div class="grid-cell-contents-container">
<span class="attachment-icon bowtie-icon bowtie-file-content"></span>
filename.filetype
Then just remove the &api-version=5.0-preview.2 part at the end
Come on Microsoft! You're better than this.
It is now possible maybe. Goto attachments and click on list view
List view of attachments of a workitem
Then just left-click on the file of your choice and drag it
This would appear to be the least "hacky" way, as it relies entirely on the Azure DevOps UI:
Go to the attachments list of the work item.
While you hover over an attachment, three vertical dots with tooltip "More actions" will be shown:
from where you can open a submenu:
In there, click "Copy attachment link".
If you paste this link to a text-only context, you will get only the attachment filename, but if you paste it into a rich-text editor with support for links, such as the Description field or Discussion comments in the work item, the attachment filename will appear as a clickable link.

Update content programmatically

I am publishing content on a TYPO3 instance where I have just editor rights. At the moment, that content is generated automatically as HTML; my workflow consists of
Copy HTML code
Log in to TYPO3
Select page
Click Edit on the HTML element of this page
Paste HTML code
Submit
Is there a library or an API that helps automating this process?
Since you are only an normal editor in your TYPO3 instance, I assume you cannot just add a TYPO3 extensions that helps you with the task. If you could alter the TYPO3 instance, there would be numerous ways to automate the process: A Scheduler task that fetches new content and puts it to a page or even fetches content from a mailbox or Dropbox share etc..
The only solution I see is that you do some browser automation to perform this task. You use e.g. use Chromium Browser Automation if you work with Chrome. You can record all form entries (username, password, paste text to RTE) and clicks and you also should be able to define some variables (ID of the page and content element, content itself).

Advanced Custom Fields wordpress plugin - Options Page Shortcode

I am using the Advanced Custom Fields Plugin (http://www.advancedcustomfields.com) with the options page add-on so I can use global variables throughout the theme (on multiple pages).
I don't know PHP and I'm trying to get the custom field from the options page by using a shortcode in the content on the different pages inside the WYSIWYG editor.
Is this possible? I can't figure out how to do it after days of trying. Can anyone help? I've tried going to the plugin's support and haven't gotten anything back.
Please Help! I really need to get this working!
References:
http://www.advancedcustomfields.com/docs/functions/using-shortcodes/
http://www.advancedcustomfields.com/add-ons/options-page/
Figured out a way around it. I can just use the shortcode they provide to reference a specific post/page ID which accomplishes the goal of only having to put it in once and it being rendered at multiple pages as long as the shortcode is there and properly formatted.
Use the post_id of option in your shortcode as per this example:
[acf field="myfieldname" post_id="option"]
Block type: Text Block (WYSIWYG field)
Text:
[acf field="NAME-OF-ACF-FIELD" post_id="options"]
Image (Return Format: Image URL) and alt text:
<img src="[acf field='NAME-OF-ACF-FIELD' post_id='options']" alt="[acf field='NAME-OF-ACF-FIELD' post_id='options']" />

Jeditable displays entire HTML document as replacement for the editable field after trigger/submit

I am using jeditable and had it working very weird.
after editing the editable field and submits it instead of printing the new content it displays the entire document window in the textbox(placeholder of editable content).
question: from the example where the author used save.php. what was the content of save.php?
is it necessary to send the result on a php file?? can't an HTML file work?
I believe within the comments box at the bottom of the author's main page - somebody has kindly provided a version of the save.php file for people to use and modify as needed.
The save.php file is used to actually save the values of the editable field/s. Without it, nothing would happen to the data and it would reset to the default text if the page is refreshed.
Options instead of a php file could be:
Saving the text/select changes to a Cookie
Using another server side methos such as asp, jsp, rails or .NET to process the saving of the changes.
an html page is a static page with no processing facility per say to communicate with the website server, so no.. html is not suitable for such a need.
Saving script must return the string you want to display on page after editing. You are now returning full html page.
Source of for all demofiles can be found from GitHub.