How to insert double quotes in TinyMCE? - tinymce

I need to have a link like this:
[url=https://www.test.com/preselectedVariationCodes=["#:discountOfferCode:#"]Activate #:discountOfferName:# odmah[/url]
However when I insert and save it part of it is removed so instead of this: ["#:discountOfferCode:#"] I get only this: []
Any suggestion how can I achieve to have to have double quotes inside my TinyMCE

Related

How can I toggle outer quote

Essentially I want the quotes to be switched according to the quote I press.
video - https://www.dropbox.com/s/72fb9zjctdmt0je/pycharm64_M2v48MSK78.mp4?dl=0
What you see in the video is me selecting quotes and then pressing other ones, for example 'test' if I select this with the single quotes and press " I expect it to turn into those quotes but if I select only the text it should just wrap another set of quotes around it.
this video was taken from PyCahrm.
So my question is:
Is there an extension out there that does this?
Can I do it with a keybind/settings?

How to remove whitespace in typeahed

I'm working on a typeahead search in flutter and let's say the user searches for bengali biriyani and return some names based on those two typed in words.
I'm splitting the search query like below:
List<String> searchWordList = search.toLowerCase().split(' ');
So List searchWordList is suppose to have ['Bengali','Biriyani']. But once I typed in bengali and put in a space the list(I'm printing the list on every turn) becomes something like this:
['Bengali', ' ']
It gets fixed as soon as I start typing something else but this should not happen.
Here are the visual presentation of the problem:
I'm guessing split() is not the way to go in this cases. But if so what can I do to mitigate this issue?
You can use trim() to remove the extra whitespace:
List<String> searchWordList = search.trim().toLowerCase().split(' ');

How to insert formated text into a merge field in word?

Ive got a word document with a lot of merge fields which look like this:
{ MERGEFIELD SOME_FIELD }
This works fine with unformatted text. But now I want to insert formated text this way. So the content of "SOME_FIELD" will be created out of Rich Text, including cursive and bold parts and newlines.
Is there a way to use merge fields where the formating comes out of the content of the related field. It does not have to be rich text.
All I found until now are solutions with automation. Like this: Word VBA macro to insert file and merge formatting
But this does not word for me because in the moment I write the content of SOME_FIELD I don't have access to automation.
SME_FIELD is set with access vba like this (in the example the formating is set with rich text but I can use another formating language too):
dim richText as string
richText = "Hey look, \b I'm bold \b0 and I'm not"
with CurrentDb.OpenRecordset("Select SOME_FIELD from SOME_TABLE")
Call .MoveFirst
!SOME_FIELD = richText
Call .Update
end with
I thought that there might be some other formating tags which word can read, but I did not find any.
It seems like its not possible to insert format information to word via a merge field.

VSCode - Is there any option to replace any form of text within single quotes in vs code?

I have a very long sql query
update emplyee_table SET name = 'abc',age='25',address='stackoverflow' WHERE id = 10
I want the above query to get replaced like this by any vscode operation.
update emplyee_table SET name = ?,age=?,address=? WHERE id = 10
You could use find and replace in VSCode along with an appropriate RegEx.
This Regex should work out: '[^';]*'
Ctrl+H will bring up the replace menu - after enabling regex replace (the button looks like .*), replace the pattern '[^';]*' with ?. Ctrl+Alt+Enter will replace all of the matches in the open editor.

Getting the content of paragraph in tinymce

Is it possible to get the content of a clicked paragraph in tinymce? If yes, how?
For ex: I have paragraph as shown below
I will use '|' to denote cursor
<p>123</p>
<p>45|6</p>
<p>789</p>
I should get output as
<p>456</p>
Any help would be appreciated.....
I believe this will do what you want:
tinymce.activeEditor.selection.getNode()
Take a look at this TinyMCE Fiddle for an example of how you might do this: http://fiddle.tinymce.com/xAfaab