token_filter module: [node:nid] for custom block? Drupal: 8.1.7

Module: token_filter 8.x-1.0-beta1

I have a custom block with a Text format that has Global and entity tokens are replaced with their values enabled.

The custom block has this value:


current-page:url:unaliased :          [current-page:url:unaliased]&#x3C;br&#x3E;
current-page:url:unaliased:absolute : [current-page:url:unaliased:absolute]&#x3C;br&#x3E;
current-page:url:unaliased:args :     [current-page:url:unaliased:args]&#x3C;br&#x3E;
current-page:url:unaliased:brief :    [current-page:url:unaliased:brief]&#x3C;br&#x3E;
current-page:url:unaliased:path :     [current-page:url:unaliased:path]&#x3C;br&#x3E;
current-page:url:unaliased:relative : [current-page:url:unaliased:relative]&#x3C;br&#x3E;


that will render as:


current-page:url:unaliased : http://www.example.com/node/1657
current-page:url:unaliased:absolute : http://www.example.com/node/1657
current-page:url:unaliased:args : , node, 1657
current-page:url:unaliased:brief : www.example.com/node/1657
current-page:url:unaliased:path : /node/1657
current-page:url:unaliased:relative : /node/1657


I am attempting to get the Content Id (e.g. [node:nid]) from the page, but that token is not available.

Workaround using Inline Javascript:

Node Id: 

&lt;script type="text/javascript"&gt;
&lt;!-- language: lang-js --&gt;
document.write("[current-page:url:unaliased:relative]".match(/\/node\/(\d+)/)[1])
&lt;/script&gt;


which will render as:


Node Id: 1657


I tried the following:


current-page:url:unaliased:args:node : [current-page:url:unaliased:args:node]
current-page:url:unaliased:args:0 : [current-page:url:unaliased:args:1]
current-page:url:unaliased:args:1 : [current-page:url:unaliased:args:1]
current-page:url:unaliased:value:node : [current-page:url:unaliased:value:0]
current-page:url:unaliased:value:0 : [current-page:url:unaliased:value:0]
current-page:url:unaliased:value:1 : [current-page:url:unaliased:value:1]


Without modifying the module how would I get [node:nid] from within a Custom block?
[current-page:url:unaliased:args:value:1]

gives you the [node:nid] even when called from a block.

As per:

https://www.drupal.org/node/1265010

..."[current-page:url:unaliased:args:value:0] (The first value, of the array of arguments, of the unaliased URL of the current page)."