You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)

Please post your question in the Forum and we will get back to you as soon as we can.

  Thursday, 08 September 2022
  2 Replies
  141 Visits
Hi, I have a fairly complex problem and I will try to describe it as best I can.
I am creating a web app that, by means of some forms, stores texts, images and tables in a mysql database. Then I export the data in a CSV file and send it to a company that has to provide automatic pagination. This company uses Adobe Indesign Server.
I created my app using the "Fabrik" software installed in Joomla. As an editor I used JCE Pro and everything works fine. The problem is that all the data is stored in html and the Indesign server does not interpret the html.
I would need to "convert" the html tags to another format. Here is an example:
<h1> Example title H1 </h1> should become <Tit100H1> Example title H1 </Tit100H1>
The Tit100H1 tag is a tag that refers to a style appropriately configured in Adobe Indesign.
Then there are other tags that I should convert but it is still the same operation.
Can you advise me how to do this conversion? I have no idea how to do it.
Thanks for those who want to help me.
one week ago
·
#111832
You would need to do this with some additional javascript in a pre-save process. For example, create a new file called editor.js in media/jce/js/ and add the following:


tinyMCE.onAddEditor.add(function (mgr, ed) {
ed.onSaveContent.add(function (ed, o) {
o.content = o.content.replace(/<(\/?)h1([^>]*)>/gi, '<$1Tit100H1$2>');
});

ed.onBeforeSetContent.add(function (ed, o) {
o.content = o.content.replace(/<(\/?)Tit100H1([^>]*)>/gi, '<$1h1$2>');
});
});

Just because you're not paranoid doesn't mean everybody isn't out to get you.

one week ago
·
#111844
You would need to do this with some additional javascript in a pre-save process. For example, create a new file called editor.js in media/jce/js/ and add the following:


tinyMCE.onAddEditor.add(function (mgr, ed) {
ed.onSaveContent.add(function (ed, o) {
o.content = o.content.replace(/<(\/?)h1([^>]*)>/gi, '<$1Tit100H1$2>');
});

ed.onBeforeSetContent.add(function (ed, o) {
o.content = o.content.replace(/<(\/?)Tit100H1([^>]*)>/gi, '<$1h1$2>');
});
});


Thanks Ryan, thanks so much, I'll start rehearsing right away. I will have to find the way to duplicate the records because I need the original HTML code to view the previews of the contents for the revision and eventual correction of the same. Thanks again.
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!