Copy text from pop - up editor to posting_body

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
TJK
Registered User
Posts: 100
Joined: Sat Dec 26, 2015 9:10 pm
Name: Tolaso J Kos
Contact:

Copy text from pop - up editor to posting_body

Post by TJK » Sun Sep 29, 2019 10:33 am

I'm developing an extension for our maths forum. I want to integrate an online latex equation editor so that writing mathematical formulae is easier. However, I'm having problem with the following: I want the written equation in the pop - up editor to be submitted to the posting_body form when copied. I cannot do that. I'd like some help to implement that part.

The extension can be downloaded from here. Apparently I cannot upload a zip file.

Thank you!

User avatar
david63
Registered User
Posts: 16848
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Copy text from pop - up editor to posting_body

Post by david63 » Sun Sep 29, 2019 10:51 am

The only extension that comes to mind that does something similar is the Advanced BBCode extension with adding links. It might be worth looking as to how that is done.

There may be other extensions doing the same.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

TJK
Registered User
Posts: 100
Joined: Sat Dec 26, 2015 9:10 pm
Name: Tolaso J Kos
Contact:

Re: Copy text from pop - up editor to posting_body

Post by TJK » Sun Sep 29, 2019 10:59 am

Hi David,

I have that extension enabled in my board. How does this extension do that? Could you give me a kick in the right direction to know what to look for?

User avatar
david63
Registered User
Posts: 16848
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Copy text from pop - up editor to posting_body

Post by david63 » Sun Sep 29, 2019 11:46 am

TJK wrote:
Sun Sep 29, 2019 10:59 am
Hi David,

I have that extension enabled in my board. How does this extension do that? Could you give me a kick in the right direction to know what to look for?
I don't know - you will have to look into the code
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
ViolaF
Registered User
Posts: 1459
Joined: Tue Aug 14, 2012 11:52 pm

Re: Copy text from pop - up editor to posting_body

Post by ViolaF » Thu Oct 03, 2019 12:44 pm

Better Prompt 4 BBCodes
https://www.phpbb.de/community/viewtopic.php?t=236211
have a simple Code-Base, so you can use it for the Latex-Thing

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1214
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: Copy text from pop - up editor to posting_body

Post by mrgoldy » Thu Oct 03, 2019 1:05 pm

You can not upload zip files, as phpBB does not want to host extensions that are not validated, to prevent confusion and issues.

You can have a look at the editor.js file (github link) to find most of the functions used with BBCodes insertion.
For example, when submitting your popup, you can use insert_text() to insert the text into the textarea.

Post Reply

Return to “Extension Writers Discussion”